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
Metadata
Release files for pydisadm 2.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pydisadm-2.2.0.tar.gz | 1.1 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pydisadm-2.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 2.2 MB
Release files / pydisadm-2.2.0.tar.gz
| Download URL | pydisadm-2.2.0.tar.gz |
|---|---|
| Size | 1.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c173b150db33078c4bf64bd5e9e6dce5a0ae81302e0f8b0044562c3f4ca9014b
|
|
BLAKE2b-256 checksum How to use checksums |
3271ad3fa1fb850629ae6684301b0bd009214e08279aea01ee6a627b69f65413
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.5
|
Release files / pydisadm-2.2.0-py3-none-any.whl
| Download URL | pydisadm-2.2.0-py3-none-any.whl |
|---|---|
| Size | 1.1 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
977074d5284f942271da3dcba5296badbe74ad6c0d98cc276a9245212253b980
|
|
BLAKE2b-256 checksum How to use checksums |
b42d6951ee047d962e7ca6d1f22604fcdc02a33bb125ee18c182e8acf76986d7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.5
|