bundesliga_tippspiel.db.settings package

Submodules

bundesliga_tippspiel.db.settings.DisplayBotsSettings module

class bundesliga_tippspiel.db.settings.DisplayBotsSettings.DisplayBotsSettings(*args, **kwargs)

Bases: jerrycan.db.ModelMixin.ModelMixin, sqlalchemy.orm.decl_api.Model

Database model that specifies whether a user wants to see bots or not

__init__(*args, **kwargs)

Initializes the Model :param args: The constructor arguments :param kwargs: The constructor keyword arguments

static bot_symbol() str
Returns

“The bot unicode symbol”

display_bots
classmethod get_state(user: jerrycan.db.User.User)

Retrieves the state of the settings for a give user :param user: The user for which to retrieve the seetings :return: True if active, False otherwise

user: jerrycan.db.User.User
user_id: int

bundesliga_tippspiel.db.settings.ReminderSettings module

class bundesliga_tippspiel.db.settings.ReminderSettings.ReminderSettings(*args, **kwargs)

Bases: jerrycan.db.ModelMixin.ModelMixin, sqlalchemy.orm.decl_api.Model

Database model that keeps track of reminder settings

__init__(*args, **kwargs)

Initializes the Model :param args: The constructor arguments :param kwargs: The constructor keyword arguments

active
get_due_matches() List[bundesliga_tippspiel.db.match_data.Match.Match]

Checks if the reminder is due and returns a list of matches that the user still needs to bet on. :return: The matches for which the reminder is due

last_reminder: str
property last_reminder_datetime: datetime.datetime
Returns

The ‘last_reminder’ parameter as a datetime object

reminder_time: int
property reminder_time_delta: datetime.timedelta
Returns

The ‘reminder_time’ parameter as a datetime timedelta

reminder_type
send_reminder()

Sends a reminder message if it’s due :return: None

send_reminder_message(message: str)

Sends a reminder message using the appropriate method of delivery :param message: The message to send :return: None

set_reminder_time(reminder_time: int)

Sets the reminder time and resets the time stored as the last reminder :param reminder_time: the new reminder time :return: None

user: jerrycan.db.User.User
user_id: int

Module contents