Slash
To Use
- Install dependencies with
npm install - Rename
config.example.jsontoconfig.jsonand fill in the fieldsbot_token: Your bot's tokenclient_id: Your bot's client idcmd_description: The description of the slash command you'd like to registercmd_name: The name of the slash command you'd like to registerglobal: Usetrueif you'd like your slash command to work globally. Usefalseif you'd like it to work in a specific guildguild_id: Only required if you setglobaltofalse. The snowflake of the guild you want to register the slash command in
- Run
npm start- If a response that shows the name and description of your slash command was logged, you did it right!
Note: As of 2020 December 16th, ou must grant your app the applications.commands OAuth scope in the guilds you'd like your slash commands to run in, even if you register a slash command globally.