Create Discord bots using a simple framework.
- Go to Discord's Developer Portal.
- Create a new application.
- Add a bot user to your app.
- Invite your bot to a server using https://discordapp.com/oauth2/authorize?client_id=DISCORD_BOT_CLIENT_ID&scope=bot.
Click to Reveal Token
to view your bot token.
Keep this token and any file containing it private! If your token ever leaks or you suspect it may have leaked, simply
regenerate
a new token to invalidate your old token.
git clone https://github.com/peterthehan/create-discord-bot.git && cd create-discord-bot/ && npm install
- Rename example.config.json to
config.json
. - Open the file and add your bot token:
{
"TOKEN": "DISCORD_BOT_TOKEN"
}
- Open src/config.js to configure your own settings.
npm start
- The bot should go from offline to online. Verify the bot is working by using the
.ping
command.
π You're ready to create your own Discord bot! π
The following bots have been made using this framework:
- https://github.com/peterthehan/discord-audit-log-bot
- https://github.com/peterthehan/discord-birthday-role-bot
- https://github.com/peterthehan/discord-reaction-role-bot
- https://github.com/peterthehan/discord-region-role-bot
Visit for more help or information!