A Discord bot providing ADM summaries.
Project description
EVE ADM Bot
This is a discord bot which will collect alliance system ADM's daily and provide commands to display them in a convenient tier list.
⚡ Quick Start
From PyPI
# 1. Set up environment (pick option)
# 1.1 With exported variables:
export DISCORD_TOKEN=your-token-here
export DISCORD_CHANNEL=your-channel-here
export DISCORD_GUILD_ID=your-guild-id
export DISCORD_APP_ID=your-app-id-here
export ALLIANCE_ID=your-alliance-id-here
export DB_SERVICE=sqlite
export DB_CONNECTION_STRING=adm-data.sqlite
export DB_KEEP_ADM_DAYS=7
# 1.2 With .env file:
cp .env.example .env
# 2. Install package from PyPI
pip install pydisadm
# 3. Run Bot
python -m pydisadm
From source
# 1. Clone repository
git clone https://github.com/agelito/adm-bot
cd adm-bot
# 2. Copy and edit .env
cp .env.example .env
# 3. Install dependencies
poetry install
# 4. Run bot
poetry run python pydisadm/__main__.py
📃 Commands
/adm summary- send a summary of ADM's/adm csv- send a csv of ADM's/adm history <name>- send a graph showing system, constellation, or region ADM over time/adm update <system>- manually update ADM for system/adm recommend- recommend a system to raise ADM in
Maintenace
/adm refresh- manually refresh the data!adm_sync_commands- synchronise the interactive discord commands (only required once)
🔧 Configuration
Configuration is done using environment variables or dotenv. See .env.example for example configuration.
DISCORD_TOKEN- the token bot should use when communicating with discord.DISCORD_CHANNEL- the channel name bot should listen too, if this is empty the bot will listen to all channels.DISCORD_GUILD_ID- the discord server bot should be part ofDISCORD_APP_ID- the bot application IDALLIANCE_ID- the alliance ID for collecting ADM values, only systems owned by this alliance will be collected.ALLIANCE_IGNORE_TCU- set to any value to ignore TCU's when collecting ADM valuesDB_SERVICE- which database to use, can be: sqlite or mysqlDB_CONNECTION_STRING- the connection stringDB_KEEP_ADM_DAYS- how many days adm history should be kept in database (default 7).
DB_CONNECTION_STRING examples
sqlite-adm-data.sqlitea file namemysql-root:root@127.0.0.1:3600/pydisadm- a connection string (user:password@host:port/database). See mysqlclient for more information
🔍 Caveats
- The ADM data from ESI is only updated once a day, so refreshing more often than that is not necessary.
- The database will continue to fill up with historic entries, manually inspect size and purge older entries if it's too big.
🚧 Development
Environment
The development environment and dependencies is managed using poetry. Use the following command to set up environment and install dependencies:
poetry install
A nested poetry shell can be started using this command:
poetry shell
Run Linting
pylint --rcfile pylint.rc pydisadm/**/*.py
Run Unit Tests
pytest tests/ --cov=pydisadm --cov-branch
💡 Credits
Project is forked from and inspired by @anjode
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pydisadm-2.2.0.tar.gz.
File metadata
- Download URL: pydisadm-2.2.0.tar.gz
- Upload date:
- Size: 1.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c173b150db33078c4bf64bd5e9e6dce5a0ae81302e0f8b0044562c3f4ca9014b
|
|
| MD5 |
f0b0894eacb20791c6b280a6a9c5d8ff
|
|
| BLAKE2b-256 |
3271ad3fa1fb850629ae6684301b0bd009214e08279aea01ee6a627b69f65413
|
File details
Details for the file pydisadm-2.2.0-py3-none-any.whl.
File metadata
- Download URL: pydisadm-2.2.0-py3-none-any.whl
- Upload date:
- Size: 1.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
977074d5284f942271da3dcba5296badbe74ad6c0d98cc276a9245212253b980
|
|
| MD5 |
81607236b84b74486e3517fa05d978f7
|
|
| BLAKE2b-256 |
b42d6951ee047d962e7ca6d1f22604fcdc02a33bb125ee18c182e8acf76986d7
|