Discord bot that converts http://xwing-legacy.com/ URL to rich embed messages
Just paste your list URL into a channel and let the bot handle it! (on Windows, you can press F6 then CTRL+C to copy URL to clipboard)
What happens under the hood:
- Parses user messages in server channels for https://xwing-legacy.com/ urls.
- Converts YASB URSL to XWS with
https://rollbetter-linux.azurewebsites.net/lists/xwing-legacy?endpoint. - Enriches pilots and upgrades with full data from xwing-data2-legacy
- Contructs human-readable rich embedded messages and sends them in original channel as a response.
- Creates a view with confirmation buttons for a user to delete their origina message to redce channel clutter.
Type /rules in discord channel to get rules for gamemodes:
And more!
Type /builders in discord channel to get URLs for gamemodes:
- YASB 2.0 Legacy
- X-Wing 2nd Ed. Squads Designer
- Infinite Arenas
- Launch Bay Next (Android/iOS)
Type /thisistheway in discord channel to get directions.
Type /reinforcements in discord channel to greet newcomers.
Tests are located in test_main.py
python -m pytest4-A7 checks if DB is initialised upon start and populates it with data if it is not present.
Run docker-compose stack with mondodb for storing xwing-data2-legacy repo.
sudo docker-compose -f /deploy/db/stack.yml up -d
Run fonts/fonts_mapping.py to extract ship icons from fonts/xwing-miniatures-ships.ttf
Linux
uvicorn api:app --port 7000 --reloadWindows
C:/Python311/python.exe -m uvicorn api:app --port 7000 --reloadR2-D7 bot
