A minimalistic Discord bot for Albion Online's killboard.
Project description
ao_killboard.py
A minimalistic Discord bot for Albion Online's killboard.
Getting Started
Prerequisites
Built with:
Getting the bot via pip
pip install ao-killboard
Getting the bot via Docker Hub
docker pull unresolvedexternal/ao-killboard
Getting the bot via Git
git clone https://github.com/antze-k/ao-killboard-py
python3 -mpip install -r ao-killboard-py/requirements.txt
Change your working directory to cd ao-killboard-py/src/antze
and run the bot with either of those, depending on your system setup:
python3 ao_killboard.py
python ao_killboard.py
ao_killboard.py
./ao_killboard.py
The documentation will refer to ao_killboard.py
further for simplicity.
Creating a bot account and setting it up for your server (guild)
- https://discordpy.readthedocs.io/en/latest/discord.html
- https://discordpy.readthedocs.io/en/latest/discord.html#inviting-your-bot (you don't have to add any specific permissions here, if you choose to add Send Messages permission manually for your channel)
- Setting permissions (scroll down to Channel Permissions)
Configure and run
Set up three parameters (guild, token and channel) either using environment variables or using command line arguments.
- "guild" is your Albion Online guild identifier (as seen in
https://albiononline.com/en/killboard/guild/<ID>
) - "token" is your bot token obtained in the previous step
- "channel" is the Discord channel ID the bot will post messages into (check this article if you need to know how to obtain it)
You can always run ao_killboard.py --help
to check the available options.
Running the bot manually using command line arguments
ao_killboard.py --guild <GUILD-ID> --token <DISCORD-TOKEN> --channel <123456789>
or, to enable debug logging:
ao_killboard.py --guild <GUILD-ID> --token <DISCORD-TOKEN> --channel <123456789> --debug
Replace the with their respective values, omitting angle brackets.
Running the bot using environment values and a batch script (Windows)
Paste the following into a file with a name like "start-bot.cmd":
@echo off
set AO_KILLBOARD_GUILD=<GUILD-ID>
set AO_KILLBOARD_TOKEN=<DISCORD-TOKEN>
set AO_KILLBOARD_CHANNEL=<123456789>
ao_killboard.py %*
Replace the with their respective values, omitting angle brackets. To enable debug logging, add set AO_KILLBOARD_DEBUG=1
before the last line.
Running the bot using environment values and a shell script (POSIX-like OS)
Paste the following into a file with a name like "start-bot.sh":
AO_KILLBOARD_GUILD=<GUILD-ID>
AO_KILLBOARD_TOKEN=<DISCORD-TOKEN>
AO_KILLBOARD_CHANNEL=<123456789>
exec ao_killboard.py "$@"
Replace the with their respective values, omitting angle brackets. Set the execute bit by running chmod +x start-bot.sh
. To enable debug logging, add AO_KILLBOARD_DEBUG=1
before the last line.
Running the bot using Docker
docker run --rm -d --env 'AO_KILLBOARD_GUILD=<GUILD-ID>' --env 'AO_KILLBOARD_TOKEN=<DISCORD-TOKEN>' --env 'AO_KILLBOARD_CHANNEL=<123456789>' unresolvedexternal/ao-killboard
or, to enable debug logging:
docker run --rm -d --env 'AO_KILLBOARD_GUILD=<GUILD-ID>' --env 'AO_KILLBOARD_TOKEN=<DISCORD-TOKEN>' --env 'AO_KILLBOARD_CHANNEL=<123456789>' --env 'AO_KILLBOARD_DEBUG=1' unresolvedexternal/ao-killboard
Replace the with their respective values, omitting angle brackets. You might also want to add --name ao-killboard
or any other Docker switches you would prefer.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ao-killboard-0.1.2.tar.gz
.
File metadata
- Download URL: ao-killboard-0.1.2.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cfea8b22b556b78a40850de1ea5deac089e9f084ed9ebaa36ca13bb83e5f63be |
|
MD5 | f6e3dd300eed4d596cb21c9db8e39237 |
|
BLAKE2b-256 | 6408c638f50cb7706b1fd15da464cc6a2a62e498a01d29b2e174616719c7dc5c |
File details
Details for the file ao_killboard-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: ao_killboard-0.1.2-py3-none-any.whl
- Upload date:
- Size: 9.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 86a994f175d5bdeb2bc4a42cc053255450708dc17836d2b9d2004c91e84c1e26 |
|
MD5 | 97edbb69a196946b7b0cb8f6c05b9395 |
|
BLAKE2b-256 | 28e760277f16500e2e88198c88cc272c0eb63182cdabdfe0132ea27fe4d58c1a |