Create Discord bots using a simple template.
The following instructions assume you are signed in with a Discord account.
- Go to Discord's My Apps page.
- Create a new app.
- Click the
Create a Bot User
button and confirm. - You can create an invitation link for your bot with
https://discordapp.com/oauth2/authorize?client_id=YOUR_DISCORD_BOT_CLIENT_ID_HERE&scope=bot
. - Click
click to reveal
to view your bot's token.
Keep your Discord bot token and any file containing it private!
- Type
git clone https://github.com/Johj/create-discord-bot.git
. - Type
cd create-discord-bot/
andnpm install
. - In the root of the
src
folder, open theconfig.json
file and add your bot's token:
{
"token": "YOUR_DISCORD_BOT_TOKEN_HERE",
"prefix": "!"
}
- Type
npm start
ornode src/index.js
to run. You're ready to add your own commands!