Skip to content
This repository has been archived by the owner on Feb 9, 2023. It is now read-only.

Leo32onGIT/death-tracker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Archive Note

This code was my personal-use discord bot.
It now exists as Violent Bot that you can just invite to your own discord server:

https://violentbot.xyz

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 :)

Discord Bot for Tibia

Current features include:

  • Online List
  • Levels List
  • Deaths List

Online player list

examples

Levels List

examples

Deaths list

no color = neutral pve
white = neutral pvp
red = ally
green = hunted
purple = rare boss (this pokes)

examples

It will poke a discord role if someone dies to a tracked monster.

tracked boss

Pre-requisites:

Create the new bot in Discord

  1. Go to: https://discord.com/developers/applications and create a New Application.
  2. Go to the Bot tab and click on Add Bot.
  3. Click Reset Token & take note of the Token that is generated.
  4. Scroll down and enable Message Content Intent.

Prepare your Discord for the bot

  1. Create a new category with the name of the server this bot is for:
    seanera
  2. Create the following channels in it:
    allies
    neutrals
    enemies
    levels
    deaths
  3. Ensure the bot has the following permissions in these channels:
    View Channel, Manage Channel, Send Messages, Manage Messages, Manage Webhooks, Read Message History
  4. Create a new category called:
    configuration
  5. Create the following channels in it:
    hunted-players
    hunted-guilds
    allied-players
    allied-guilds

This is what it should look like:

prep example

Custom Emojis and Poke Roles

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.

  1. Open the discord.conf file and edit it.
  2. Point to emoji ids and role ids that exist on your discord server.

Prepare your linux machine to host the bot

  1. Ensure docker is installed.
  2. Ensure default-jre is installed.
  3. Ensure sbt is installed.

Deployment Steps

  1. Clone the repository to your host machine:
    git clone https://github.com/Leo32onGIT/death-tracker.git
  2. Open the discord.conf file and edit it.
  3. Change world-channels to the server you wish to track (it is set to seanera by default).
  4. Navigate to the folder that contains the main build.sbt file:
    cd death-tracker
  5. Compile the code into a docker image:
    sbt docker:publishLocal
  6. Take note of the docker <image id> you just created: docker images

docker image id

  1. Create a prod.env file with the discord server/channel id & bot authentication token:
TOKEN=XXXXXXXXXXXXXXXXXXXXXX   
GUILD_ID=XXXXXXXXXXXXXXXXXXX   
  1. Run the docker container you just created & parse the prod.env file:
    docker run --rm -d --env-file prod.env <image_id>

Debugging

  1. If something isn't working correctly you should be able to see why very clearly in the logs.
  2. Use docker ps to find the <container id> for the running bot.
  3. Use docker logs <container id> to view the logs.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Scala 100.0%