A Discord bot for Albion Online's kill board.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
!ping- replies with @user pong!kbclear- deletes all messages in the config.botChannel!kbinfo <eventId>- displays the kill board post for a specific kill to the current channel
- NodeJS
- Docker
- AWS CLI (for running on EC2)
- SSH Client (for connecting to EC2)
-
Clone the repository:
git clone https://github.com/pierrefeza/AOKillBoard-DiscordBot.git cd AOKillBoard-DiscordBot -
Install Node.js dependencies:
npm install
-
Create a new Discord Application:
- Visit the Discord Developer Portal
- Create a new application and add a bot to it.
- Copy the 'BOT' token
-
Set up your
config.json:- Copy
config.json.exampletoconfig.json - Update
config.jsonwith your bot token, botChannel, and other necessary details.
Example
config.json:"cmdPrefix": "!", "allianceName": "<NONE>", "guildName": "8-bit", "username": "AOKillBoard-DiscordBot", "admins": [ "ADMIN_ID" ], "botChannel": "445822300890946337", "playingGame": "Albion Killboard Bot", "token": "YOUR_DISCORD_BOT_TOKEN" }``` - Copy
- Build the Docker image:
docker build -t aokillboard-discordbot . - Run the Docker container:
docker run -d --name aokillboard-discordbot aokillboard-discordbot
- Check the logs:
docker logs -f aokillboard-discordbot
- Summary commands
docker stop aokillboard-discordbot docker rm aokillboard-discordbot docker build -t aokillboard-discordbot . docker run -d --name aokillboard-discordbot aokillboard-discordbot docker logs -f aokillboard-discordbot
-
Launch an EC2 instance:
- Use the AWS Management Console to launch an EC2 instance with Amazon Linux 2 AMI
- Ensure the instance has a security group that allows inbound SSH (port 22) and the port your bot will use (usually 443 for HTTPS)
-
Connect to your EC2 instance:
ssh -i /path/to/your-key-pair.pem ec2-user@your-ec2-public-ip
-
Install Docker on EC2:
sudo yum update -y sudo amazon-linux-extras install docker sudo service docker start sudo usermod -a -G docker ec2-user
-
Logout and login again to apply the Docker group changes:
exit ssh -i /path/to/your-key-pair.pem ec2-user@your-ec2-public-ip -
Install Node.js dependencies for buildiung the Docker image:
sudo yum install -y gcc-c++ make curl -sL https://rpm.nodesource.com/setup_16.x | sudo bash - sudo yum install -y nodejs -
Clone the repository on EC2:
git clone https://github.com/pierrefeza/AOKillBoard-DiscordBot.git cd AOKillBoard-DiscordBot -
Copy your local
config.jsonto the EC2 instance:scp -i /path/to/your-key-pair.pem /path/to/your/config.json ec2-user@your-ec2-public-ip:/home/ec2-user/AOKillBoard-DiscordBot/
-
Build the Docker image on EC2:
docker build -t aokillboard-discordbot . -
Run the Docker container on EC2:
docker run -d --name aokillboard-discordbot aokillboard-discordbot
-
Check the logs to ensure the bot is running:
docker logs -f aokillboard-discordbot
-
Commands to clean docker env*
docker image prune -a -f docker container prune -f docker volume prune -f docker network prune -f docker system prune -a -f
- Discord.js - Discord app library for Node.js and browsers.
- Axios - Promise-based HTTP Client for node.js
- Current working state by Pierre Donal Feza Discord: yokokosparda
- UI Layout inspiration - albion-killbot
- Initial Implementation from Mark Arneman

