Production:
Current features include:
- Online List
- Levels List
- Deaths List
- Activity List (guild & name changes)
- Poke if enemy dies fullbless
- Poke if anyone dies to a rare nemesis boss
- Go to: https://discord.com/developers/applications and create a New Application.
- Go to the Bot tab and click on Add Bot.
- Click Reset Token & take note of the
Tokenthat is generated. - Scroll down and enable Message Content Intent.
The bot is configured to point to emojis and roles in my discord server.
You will need to change this to point to your emojis and your discord roles.
- Open the discord.conf file and edit it.
- Point to
emoji idsandrole idsthat exist on your discord server.
- Ensure
dockeris installed. - Ensure
default-jreis installed. - Ensure
sbtis installed. - Download the
postgresdocker image:
docker pull postgres
- Clone the repository to your host machine.
- Compile the code into a docker image:
sbt docker:publishLocal - Take note of the docker <image id> you just created:
docker images
- Create a
prod.envfile with the discord server/channel id & bot authentication token:
TOKEN=XXXXXXXXXXXXXXXXXXXXXX POSTGRES_HOST=sqlhost POSTGRES_PASSWORD=XXXXXXXXXX
- Create the docker volume for the postgres database:
docker volume create --name pgdata - Run the postgres docker image:
docker run --rm -d -t --env-file prod.env --hostname sqlhost --name postgres -p 5432:5432 -v pgdata:/var/lib/postgresql/data postgres - Run the docker container you just created & parse the prod.env file:
docker run --rm -d -t --env-file prod.env --link postgres:postgres --name tibia-bot <image_id>
- If something isn't working correctly you should be able to see why very clearly in the logs.
- Use
docker psto find the <container id> for the running bot. - Use
docker logs <container id>to view the logs. - Use
docker pull dpage/pgadmin4anddocker run -t --name pgadmin -p 0.0.0.0:82:80 --link postgres:postgres -e 'PGADMIN_DEFAULT_EMAIL=XXXXXXX@gmail.com' -e 'PGADMIN_DEFAULT_PASSWORD=XXXXXXXX' -d dpage/pgadmin4if you need to visualise the postgres dbs
