Registering a command

Here's how to register a command.

You only need to register each command one time.

It is recommended to use an eval() command for this, although this will work without the check.

bot.js
client.api.applications(client.user.id).guilds('guild-id-here').commands.post({
        data: {
            name: "help",
            description: "Get information about the bot."
            // possible options here e.g. options: [{...}]
        }
});

Last updated

Was this helpful?