Skip to content

Access League Data Guide

This guide provides information on where the bot stores its league submission data and generated deck images when using the default local storage configurations (SQLite3 database and local file system for images).

The core league submission data, including information about seasons, weeks, teams, players, and their submitted decklists, is stored in a local SQLite3 database file.

  • Default Location: ./data/database.db

This file is automatically created the first time the bot is run. You can access and query this database file using any standard SQLite database tools or libraries. The database schema is defined by the following two tables:

This table stores the current administrative settings for the league.

Column NameData TypeDescription
idVARCHARUnique identifier for the setting entry.
created_atDATETIMETimestamp when the entry was created (UTC).
updated_atDATETIMETimestamp when the entry was last updated (UTC).
current_seasonINTEGERThe currently configured season number.
current_weekINTEGERThe currently configured week number.
enable_deck_submissionsBOOLEANFlag indicating if deck submissions are enabled.

This table stores information about each submitted deck.

Column NameData TypeDescription
idVARCHARUnique identifier for the deck submission.
created_atDATETIMETimestamp when the submission was created (UTC).
updated_atDATETIMETimestamp when the submission was last updated (UTC).
seasonINTEGERThe season the deck was submitted for.
weekINTEGERThe week within the season the deck was submitted for.
submitter_idINTEGERThe Discord ID of the Team Captain who submitted the deck.
submitter_nameVARCHARThe Discord name of the Team Captain who submitted the deck.
team_role_idINTEGERThe Discord role ID of the team the deck belongs to.
team_nameVARCHARThe name of the team the deck belongs to.
player_nameVARCHARThe name of the player the deck belongs to.
player_orderINTEGERThe order of the player within the team’s submission (1-5).
deck_filenameVARCHARThe original filename of the submitted .ydk file.
deck_ydk_urlVARCHAROptional URL if the .ydk was submitted via a link.
deck_image_urlVARCHARThe URL where the generated deck image can be accessed (if hosted externally).
deck_image_pathVARCHARThe local file path to the generated deck image.
deck_ydk_contentVARCHARThe raw content of the submitted .ydk file.

Visual representations of the submitted decks, generated from the .ydk files using the PIL library, are stored as image files on the local file system.

  • Default Location: ./data/decks/

Each image file in this directory is named with a unique identifier (UUID) and is saved in the WEBP format.

The bot generates logs that can be helpful for monitoring its activity and troubleshooting issues.

  • Default Location: ./logs/bot.log

The bot is configured with file rotation for its logs. Depending on the ENVIORNMENT setting in your .env file (production or local), the logging level will be set to INFO or DEBUG respectively, providing more verbose output in local mode.