- Node 12 or newer (LTS recommended)
- VS Code (or similar)
- Discord Server
Go to Discord Apps Dashboard to create your new application or bot: https://discord.com/developers/applications/
- Create a
New Application - Setup an app name and click on
Create - Go to
Botsettings and add a new one (here you can find thebot token) - Go to
OAuth2set the stope tobot - Set the bot permissions to
Administrator - Copy the scope invitation link and paste on a new tab. Then invite the bot to your server
Run the following command:
npm init # to setup your package
npm i discord.js # to install a Discord package and interact with their API
cp config.mock.json config.json # to setup the your private bot tokenThen update the BOT_TOKEN with your real one in the config.js file.
{
"BOT_TOKEN": "YOUR_BOT_TOKEN_HERE"
}You can reveal your private bot token in the
Botdashboard settings
node index.jsNow you can see your bot online on your Discord server