Server & Global commands
By default, your commands will be registered globally. This means it will be available to all servers your bot is in. However, this may not be something you want, as globally registered commands can take a while to be pushed or removed from Discord. You especially don't want this during development.
To ensure your commands are registered on a specific server, add the testServer
property to DiscordHandler
like this:
index.js
It's important to note that guild(server)-based commands can only be registered if your bot is in the specified server.
When you're taking your bot public and want it to have its commands registered globally, then remove the testServer
property.
Last updated