From 4a5e0ef2f3ca785ff1792394964256a36ddba9d1 Mon Sep 17 00:00:00 2001 From: Wizzy69 Date: Sat, 17 Dec 2022 12:38:21 +0200 Subject: [PATCH] --- README.md | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 50b41e4..029a402 100644 --- a/README.md +++ b/README.md @@ -20,23 +20,9 @@ Plugin Types: ### How to create a plugin First of all, Create a new project (class library) in Visual Studio. -![Imgur Image](https://i.imgur.com/KUqzKsB.png) +Then import the PluginManager.dll as project to your project. -![Imgur Image](https://i.imgur.com/JzpEViR.png) - -![Imgur Image](https://i.imgur.com/vtoEepX.png) - -![Imgur Image](https://i.imgur.com/ceaVR2R.png) - -Now, let's add the PluginManager reference. It can be found inside the bot's main folder under -`DiscordBot/bin/Debug/net6.0/PluginManager.dll` or `PluginManager/bin/Debug/net6.0/PluginManager.dll` -after one successfull build. - -![Imgur Image](https://i.imgur.com/UMSitk4.png) - -![Imgur Image](https://i.imgur.com/GEjShdl.png) - -1. Commands +## 1. Commands Commands are loaded when all plugins are loaded into memory. When an user executes the command, only then the Execute function is called. Commands are plugins that allow users to interact with them. @@ -103,7 +89,7 @@ From here on, start coding. When your plugin is done, build it as any DLL projec Then, reload bot and execute command `lp` in bot's console. The plugin should be loaded into memory or an error is thrown if not. If an error is thrown, then there is something wrong in your command's code. -2. Events +## 2. Events Events are loaded when all plugins are loaded. At the moment when they are loaded, the Start function is called. Events are used if you want the bot to do something when something happens in server. The following example shows you how to catch when a user joins the server @@ -137,7 +123,7 @@ public class OnUserJoin : DBEvent - client - the discord bot client -3.Slash Commands +## 3. Slash Commands Slash commands are server based commands. They work the same way as normal commands, but they require the `/` prefix as they are integrated