AOE 4 Elo Bot
A Discord bot that automatically retrieves Elo ratings for Age of Empires 4 and gives users custom roles.
Uses the public API for the Age of Empires Leaderboards via my aoe4api library.
Build Instructions
Before using the AOE 4 Elo Bot backend, a Discord application and bot must be set up and added to a Discord server here.
Go CLI
The simplest way to compile and run the bot is directly with the Go CLI. Make sure Go v1.17 or higher is installed.
First, clone the repo and navigate into its directory:
$ git clone https://github.com/alexisgeoffrey/aoe4elobot.git
$ cd aoe4elobot
Then, run the project, replacing the placeholders with their proper values:
$ go run . -t DISCORD_BOT_TOKEN
Docker
A Dockerfile is included in this repo so the bot can be run in a Docker container. First, clone the repo and navigate into its directory as before. Then, build the Docker image:
$ sudo docker build . -t aoe4elobot
Then, create, a volume for the bot config file:
$ sudo docker volume create aoe4elobot-config
Finally, run the image, replacing token
and id
with the proper values:
$ sudo docker run -v aoe4elobot-config:/app/config \
-e AOE4ELO_TOKEN=token \
aoe4elobot
Alternatively, Docker Compose can be used. Here is a sample docker-compose.yml
:
services:
aoe4elobot:
image: aoe4elobot
container_name: aoe4elobot
environment:
- AOE4ELO_TOKEN=token
volumes:
- config:/app/config
volumes:
config:
Server Commands
!setEloInfo AOE4_USERNAME, AOE4_ID
- Registers your AOE4 username and ID in the bot to retrieve your Elo rating.
!updateElo
- Manually updates Elo ratings for all registered members on the server.
Developed with DiscordGo.
I also used these helpful tools from Matt Holt: