- Hosting the bot
- Finding your bot's token
- Inviting your bot
- Installing Docker
Hosting the bot
Before you follow this, make sure that you have Docker installed.
- Grab the docker compose file and put it in a directory of your choice (where you want to run the bot)
- In the command line, navigate into that directory
- Run
echo "BOT_TOKEN=<YOUR TOKEN>" >> .env
- Run
docker compose up
The bot will now run and automatically check for updates every 24hrs
Finding your bot token
- Go tho the Discord developer portal
- Click on
New Application
, give your bot a name and click onCreate
- On the left side, click on
Bot
- Click on
Add Bot
- Now, you should see a new
Build-A-Bot
section. In theToken
subsection of this, click onCopy
NOTE: Do NOT share this token with anyone!
Inviting your bot
Make sure that you have already created a bot application. If not, follow the steps under 'Finding your bot's token'.
- Go to the Discord developer portal and click on your application (bot)
- On the left side, click on
OAuth2
->URL Generator
- Select
bot
andapplication.commands
- In the
Bot Permissions
section, selectAdministrator
- Scroll down to the bottom of the page and click on
Copy
- Now paste the copied url into a new tab and add the bot to your server
Installing Docker
- On Windows and macOS, you can simply install Docker Desktop
- On Linux, I prefer using the installation script.
$ curl -fsSL https://get.docker.com -o get-docker.sh
$ sudo sh get-docker.sh