diff --git a/site/docs/nodejs/CommandHandler/create-command.md b/site/docs/nodejs/CommandHandler/create-command.md index 672d265ba..806d71c61 100644 --- a/site/docs/nodejs/CommandHandler/create-command.md +++ b/site/docs/nodejs/CommandHandler/create-command.md @@ -52,7 +52,7 @@ module.exports = pingCommand; ``` - The `BaseCommand` is extended with the `CommandResponses` class. -- The ping command class is been extended with the `BaseCommand` class. +- The ping command class is extended with the `BaseCommand` class. - Some static properties are assigned to the ping command class, in order to access it in the cache, such as `name`, `description`, `usage`, `category` and `slash`... - The `execute()` function will be called, when the command has been run by the user. diff --git a/site/docs/nodejs/EventHandler/event-manager.md b/site/docs/nodejs/EventHandler/event-manager.md index 1740f07d8..5ffebf07a 100644 --- a/site/docs/nodejs/EventHandler/event-manager.md +++ b/site/docs/nodejs/EventHandler/event-manager.md @@ -113,7 +113,7 @@ const client = Discord.createBot({ Discord.startBot(client); ``` -Moreover, you can customize the `EventManager` and add more functionality to it and make it exactly fit your your needs +Moreover, you can customize the `EventManager` and add more functionality to it and make it exactly fit your needs or even emit events, by extending it. Of course you wonder what you can do with all of this now. We will explain this further on the next page. diff --git a/site/docs/nodejs/EventHandler/getting-started.md b/site/docs/nodejs/EventHandler/getting-started.md index ef6d0e8c4..350c2e655 100644 --- a/site/docs/nodejs/EventHandler/getting-started.md +++ b/site/docs/nodejs/EventHandler/getting-started.md @@ -12,13 +12,13 @@ Since the `EventEmitter` class is commonly used you probably already know it fro Discordeno decided against it as it comes with several downsides which are mentioned below. -Performance plays a more important role than handling, however this event management system can be easily implemented -since it only needs a few changes in your code. - - It's easy to create memory leaks, when you add too many listeners or go carelessly with it. - Many fragmented parts of event code complicate maintenance. - ErrorHandling is difficult and debugging is harder when many listeners are open for the same events. +Performance plays a more important role than handling, however this event management system can be easily implemented +since it only needs a few changes in your code. + In the following we will show you, how to create an event manager, which is compatible with Discordeno's Client. :::info template diff --git a/site/docs/nodejs/EventHandler/handle-event.md b/site/docs/nodejs/EventHandler/handle-event.md index 2ebe9632b..4a42199bb 100644 --- a/site/docs/nodejs/EventHandler/handle-event.md +++ b/site/docs/nodejs/EventHandler/handle-event.md @@ -6,7 +6,7 @@ sidebar_position: 3 When an event is fired, Discordeno sends two important things: the `client` instance and the `payload`. -As mentioned in the `Structure` section the `payload` object, does not contain any functions, its a plain json object. +As mentioned in the `Structure` section, the `payload` object does not contain any functions as it's a plain json object. In order to take use of our nice built structures, we need to transform the payload into a structure. diff --git a/site/docs/nodejs/Structures/create-structure.md b/site/docs/nodejs/Structures/create-structure.md index 533127c96..39a21b478 100644 --- a/site/docs/nodejs/Structures/create-structure.md +++ b/site/docs/nodejs/Structures/create-structure.md @@ -32,7 +32,7 @@ class Channel { } async send(options) { - return await client.helpers.sendMessage(this.id, options); + return await this.client.helpers.sendMessage(this.id, options); } } ``` diff --git a/site/docs/nodejs/slash-command.md b/site/docs/nodejs/slash-command.md index a0d096e8c..0d08fec7d 100644 --- a/site/docs/nodejs/slash-command.md +++ b/site/docs/nodejs/slash-command.md @@ -32,7 +32,7 @@ This is just very simple example, you can also add sub commands, select options ## Handling Slash Commands -Discord sends a WebSocket Event, when a user runs a slash command. You can listen to this event by add the +Discord sends a WebSocket Event when a user runs a slash command. You can listen to this event by adding the `interactionCreate` function in the client. ```js