This code was my personal-use discord bot.
It now exists as Violent Bot that you can just invite to your own discord server:
I am not publically advertising this bot yet as I focus on building more and more features into it.
You are still welcome to use it & provide feedback :)
Current features include:
- Online List
- Levels List
- Deaths List
no color
= neutral pve
white
= neutral pvp
red
= ally
green
= hunted
purple
= rare boss (this pokes)
It will poke a discord role if someone dies to a tracked monster.
- 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
Token
that is generated. - Scroll down and enable Message Content Intent.
- Create a new category with the name of the server this bot is for:
seanera
- Create the following channels in it:
allies
neutrals
enemies
levels
deaths
- Ensure the bot has the following permissions in these channels:
View Channel
,Manage Channel
,Send Messages
,Manage Messages
,Manage Webhooks
,Read Message History
- Create a new category called:
configuration
- Create the following channels in it:
hunted-players
hunted-guilds
allied-players
allied-guilds
This is what it should look like:
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 ids
androle ids
that exist on your discord server.
- Ensure
docker
is installed. - Ensure
default-jre
is installed. - Ensure
sbt
is installed.
- Clone the repository to your host machine:
git clone https://github.com/Leo32onGIT/death-tracker.git
- Open the discord.conf file and edit it.
- Change
world-channels
to the server you wish to track (it is set toseanera
by default). - Navigate to the folder that contains the main build.sbt file:
cd death-tracker
- 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.env
file with the discord server/channel id & bot authentication token:
TOKEN=XXXXXXXXXXXXXXXXXXXXXX GUILD_ID=XXXXXXXXXXXXXXXXXXX
- Run the docker container you just created & parse the prod.env file:
docker run --rm -d --env-file prod.env <image_id>
- If something isn't working correctly you should be able to see why very clearly in the logs.
- Use
docker ps
to find the <container id> for the running bot. - Use
docker logs <container id>
to view the logs.