docs: correct grammar and typos in the Nodejs doc (#2109)

* Fix grammar

* Correct grammar and typos
This commit is contained in:
Debert Jamie
2022-03-20 15:34:59 +07:00
committed by GitHub
parent 5c2ed9573c
commit 39f94c5c20
6 changed files with 8 additions and 8 deletions

View File

@@ -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.

View File

@@ -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.

View File

@@ -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

View File

@@ -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.

View File

@@ -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);
}
}
```

View File

@@ -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