Gabriella ef24032b68
Some checks failed
Test Helper Module / test (3.11.5) (push) Has been cancelled
Enhancement/db_helper: Clean up linebreaks
2025-10-17 11:45:20 -06:00
2025-10-16 14:04:02 -06:00
2025-10-16 14:03:22 -06:00
2025-10-16 14:04:02 -06:00
2025-10-16 14:04:02 -06:00
2025-10-16 16:17:39 -06:00
2025-10-16 14:04:02 -06:00
2025-10-16 14:04:02 -06:00
2025-10-16 14:04:02 -06:00
2025-10-16 14:04:02 -06:00
2025-10-16 14:04:02 -06:00
2025-10-16 14:03:22 -06:00
2025-10-16 14:04:02 -06:00

Info

raid-callouts is a toolset developed for the purpose of keeping track of when people are going to be absent from raid nights for my FFXIV raid team. There's some back-end things that go unsaid in the code, but will be documented here.

Runtime

Currently, this Discord bot is designed to run in two parts, which each part will be gone over here. There is also a "database helper" module, which is called as needed by the bot components.

On the server itself, the bot_core and the bot_aux are "composed" into two containers using Docker Compose on a service account, and then can be invoked or run using cron in order to schedule things like the daily "posting" of the next week's callouts. There is also a postgresql database backend for long-term storage of callouts.

bot_core ("listener")

The bot's core, is an "always on" bot, that listens for slash commands to be sent to it, and responds as necessary. Commands and their outputs can be viewed on the wiki found here.

The core of the bot is using the command /callout, with a supplied day, month and year and reason for callout. This will then be printed to the Discord channel where that command was invoked, in order to show the schedule (by default for the next 7 days).

The listener is also able to view the schedule for the next x days using the command /schedule x, where x is the number of days that should be viewed. This should be a fast response, but is dependant on how fast the database can return a query.

There is an added layer of complexity, as there is the ability to register the

bot_aux ("poster")

The bot's "auxillary" is a python script developed in order to post on script execution, a formatted Discord message that details the callouts for the next 7 days.

This poster is invoked, upon Docker Compose completion; by the cron daemon running the following:

# omitting the cron-related timing format, which is as-needed
docker container start raid-callouts-xiv-poster-1

postgres Database

The format of the database can be found in the src/sql/ directory, and contains the base level SQL that was used in the production database.

Quickstart (/w conda)

conda install

conda can be installed from here.

Once conda is installed

  1. Clone the repo

  2. Navigate to the cloned repo

cd ./raid-callouts
  1. Install the environment /w conda & pip
conda env create --file environment.yml
# Run this pip command to assure that all requirements are actually installed
pip install -r requirements.txt
  1. Activate the environment
conda activate raid-callouts
  1. conda handles all the installation of the packages and dependencies for these modules. A requirements.txt is maintained for both virtualenv users, and for GitHub Actions runtime simplicity.

  2. You need to provide your own database.ini file, that contains your own PSQL database, if you wish to self-host the bot. Otherwise, testing will be done on Pull Request.

Contributing

Pull requests are welcome. For major changes, please open issues first to discuss what you would like to change.

License

The license for raid-callouts is the GNU General Public License. Please see License for more information.

Description
No description provided
Readme 166 KiB
Languages
Python 98.2%
Makefile 1.8%