A discord bot that does a bunch of things.
- A Discord Bot Token
- Docker installed
- Go 1.14 installed (Optional)
- Visit this site
- Create a new application
- Add a bot to the application
- Copy the Bot Token
-
Navigate to the Repo
-
Run the docker-compose build command
docker-compose build
Note: On linux this should be done as sudo
-
Navigate to the repo
-
Copy the
TEMPLATE.env
to.env
-
Fill in the
.env
fileNote: Ensure that the mongo data directory has been created
Note: On a Windows host a drive must be shared first on docker hub
-
Run the containers
docker-compose up
Note: On linux this should be done as sudo
Note: This command can be ran with a
-d
to run in detached mode
-
Navigate to the repo
-
Stop the containers
docker-compose down
Note: On linux this should be done as sudo
A note about this, a mongo database needs to be running. (I have no idea how to do that without docker)
-
Navigate to the repo directory
-
Run this command
go build
This has now created an executable with the same name as the repo directory.
- Visit this site
- Select the application you created
- Select the
OAuth2
section of the application - Under Scopes select
- bot
- Under Bot Permission
- Send Messages
- Manage Messages
- Read Message History
-
Navigate to the executable
-
Run the executable
./discord-bot.exe -t <token>
For example
./discord-bot.exe -t ASDFGHJ.1234.ASDFGHJ