Skip to content

Commit

Permalink
chore(commands): clarify custom property usage (discordjs#869)
Browse files Browse the repository at this point in the history
  • Loading branch information
itsravenous authored Oct 11, 2021
1 parent 47155d5 commit 965547f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions guide/creating-your-bot/command-handling.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ const client = new Client({ intents: [Intents.FLAGS.GUILDS] });
client.commands = new Collection();
```

We recommend attaching a `.commands` property to your client instance so that you can access your commands in other files. The rest of the examples in this guide will follow this convention.

::: tip
[`fs`](https://nodejs.org/api/fs.html) is Node's native file system module. <DocsLink section="collection" path="class/Collection" /> is a class that extends JavaScript's native [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) class, and includes more extensive, useful functionality.
:::
Expand Down

0 comments on commit 965547f

Please sign in to comment.