Discord bot for MDN discord server.
Requires node v18+, run npm install
to get required modules.
Run node ./index.js
to start the application.
If a slash command is added/removed or any command data is modified (i.e. name, description, parameters), then run node ./deploy_commands.js
to sync this information with the development server on Discord. Use the -global
flag to deploy these commands globally (to every Discord server the bot is in).
The bot will need a config.json file in the root of the folder, in the following form:
{
"token": "insert-token-here",
"clientId": "insert-client-id",
"guildId": "insert-guild-id"
}
See Configuration files for information on getting the Bot token. Also see Guild commands for where to find the clientId and guildId, where the guild is the development server of the bot.
The bot will require the bot
and application.commands
scopes to function properly (see here for more info), as well as the following permissions in the Discord server:
- Manage Channels
- Manage Roles
- Manage Nicknames
- Mention Everyone
- Use Application Commands