Discord Bot
Important
The core must be built before running the bot.
Configuration File¤
The database and API can run out of the box without any configuration file using the defaults. However, running the discord bot/building the frontend will require you to provide custom config.
To do this, rename ./config.example.json to ./config.json and modify it. Then, run:
python3 -m src.am4 cfg set config.json
./src/am4/.config.json, which is used in future calls.
Database¤
User authentication is handled by pocketbase, a lightweight SQLite-based backend supporting OAuth2.0.
It is automatically started before the API/discord bot when using the CLI.
Discord bot¤
It is similar to the API in design, but is more sophisticated in that it reads users' roles to determine their game mode.
To start it, use:
python3 -m src.am4 start bot
Documentation for legacy code, click to expand.
Features¤
Old bot:
- calculates essential statistics
- most distance-efficient stopovers
- route demands, best seat configurations, best ticket prices, estimated income
- player rank, mode, achievements, fleet
- alliance rank, share value, contribution
- aircraft characteristics and profit
- airport characteristics
- CSV export for route queries
- fuel/CO2 notifications
- aircraft characteristics comparisons
- internal Star Alliance tools (now disbanded)
- adding competitor alliances to watchlist
- alliance comparisons over time: value,contribution/day, rate of changes
- realtime alliance-member comparisons: SV/contribution distribution
- member tracking: cheat detection tools, departure pattern identification
Public¤
$route|stop <airport> <airport> <aircraft> [flights_per_day] [reputation]: finds the best route between two airports

$routes <airport> <aircraft> <max_distance> <flights_per_day> [reputation]: finds the best destinations from a certain airport, sorted by decreasing estimated income

$user [player]: shows player (and associated alliance if found) statistics

$fleet [player]: shows player fleet and estimated income

$info <aircraft>: shows basic aircraft information and rough profit estimations

$compare <aircraft>: compares two aircrafts

$search <aircraft>: finds the associated aircraft shortname for aircraft commands

$airport <airport>: shows airport information

$price f[fuel_price] c[co2_price]: notifies everyone for the fuel price

Internal Alliance Tools¤
$memberCompare <player> <player>: compares descending structure of contribution/day and SV
- $alliance <alliance>: shows AV progression and d(AV)/dt.
- $allianceCompare <alliance> <alliance>: compares AV progression and gap difference over time, shows 48h/12h-average contribution/day graphs
- $member <player> [player[]] shows contribution/day, total contribution and SV history for 1+ members
- $actions <player> [maxResults]: shows log of estimated departures, contributions and income
- $watchlist [add|+, remove|rm|-] [alliance]: shows, adds or remove alliance(s) to the watchlist