otaku_info_bot package

Submodules

otaku_info_bot.OtakuInfoBot module

class otaku_info_bot.OtakuInfoBot.OtakuInfoBot(connection: bokkichat.connection.Connection.Connection, location: str, db_uri: Optional[str] = None)

Bases: kudubot.Bot.Bot

The OtakuInfo Bot class that defines the anime reminder functionality.

activate_config(address: kudubot.db.Address.Address, args: Dict[str, Any], db_session: sqlalchemy.orm.session.Session, config_cls: Any)

Activates a configuration for a user :param address: The user’s address :param args: The command arguments :param db_session: The database session :param config_cls: The configuration class :return: None

bg_iteration(_: int, db_session: sqlalchemy.orm.session.Session)

Periodically checks for new notifications and sends them out :param _: The iteration count :param db_session: The database session to use :return: None

cache_delay_count = 0

Used to stagger out cache stores of manga chapter guesses so that they don’t all occur at the same time

deactivate_config(address: kudubot.db.Address.Address, db_session: sqlalchemy.orm.session.Session, config_cls: Type[otaku_info_bot.db.config.NotificationConfig])

Deactivates an anilist configuration for a user :param address: The address for which to deactivate the config :param db_session: The database session to use :param config_cls: The configuration class to use :return: None

get_cached_manga_chapter_guess(anilist_id: int, db_session: sqlalchemy.orm.session.Session) → int

Uses manga chapter guesses from the database to reduce requests to anilist servers and generally reduce loading times :param anilist_id: The anilist ID for which to get the chapter guess :param db_session: The database session to use :return: The manga chapter guess

classmethod name() → str
Returns

The name of the bot

on_activate_anime_notifications(address: kudubot.db.Address.Address, args: Dict[str, Any], db_session: sqlalchemy.orm.session.Session)

Activates anime notifications for a user :param address: The user’s address :param args: The arguments, containing the anilist username :param db_session: The database session to use :return: None

on_activate_manga_notifications(address: kudubot.db.Address.Address, args: Dict[str, Any], db_session: sqlalchemy.orm.session.Session)

Handles activating manga notifications for a user using anilist :param address: The user that sent this request :param args: The arguments to use :param db_session: The database session to use :return: None

on_deactivate_anime_notifications(address: kudubot.db.Address.Address, _, db_session: sqlalchemy.orm.session.Session)

Deactivates anime notifications for a user :param address: The user’s address :param _: The arguments :param db_session: The database session to use :return: None

on_deactivate_manga_notifications(address: kudubot.db.Address.Address, _, db_session: sqlalchemy.orm.session.Session)

Handles deactivating manga notifications for a user using anilist :param address: The user that sent this request :param _: The arguments :param db_session: The database session to use :return: None

on_list_ln_releases(address: kudubot.db.Address.Address, args: Dict[str, Any], _)

Handles listing current light novel releases :param address: The user that sent this request :param args: The arguments to use :param _: The database session :return: None

on_list_new_anime_episodes(address: kudubot.db.Address.Address, _, db_session: sqlalchemy.orm.session.Session)

Handles listing new episodes for a user :param address: The address that requested this :param _: The arguments :param db_session: The database session to use :return: None

on_list_new_completed_chapters(address: kudubot.db.Address.Address, _, db_session: sqlalchemy.orm.session.Session)

Handles listing new manga chapters for a user Only sends notifications for currently completed manga series :param address: The address that requested this :param _: The arguments :param db_session: The database session to use :return: None

on_list_new_completed_episodes(address: kudubot.db.Address.Address, _, db_session: sqlalchemy.orm.session.Session)

Handles listing new episodes for a user Only sends notifications for completed anime series :param address: The address that requested this :param _: The arguments :param db_session: The database session to use :return: None

on_list_new_manga_chapters(address: kudubot.db.Address.Address, _, db_session: sqlalchemy.orm.session.Session)

Handles listing new manga chapters for a user :param address: The address that requested this :param _: The arguments :param db_session: The database session to use :return: None

on_list_new_releasing_chapters(address: kudubot.db.Address.Address, args: Dict[str, Any], db_session: sqlalchemy.orm.session.Session)

Handles listing new manga chapters for a user. Only sends notifications for currently releasing manga :param address: The address that requested this :param args: The arguments provided by the user :param db_session: The database session to use :return: None

on_list_new_releasing_episodes(address: kudubot.db.Address.Address, args: Dict[str, Any], db_session: sqlalchemy.orm.session.Session)

Handles listing new episodes for a user Only sends notifications for currently releasing anime series :param address: The address that requested this :param args: The arguments provided by the user :param db_session: The database session to use :return: None

on_toggle_ranked_mode(address: kudubot.db.Address.Address, _: Dict[str, Any], db_session: sqlalchemy.orm.session.Session)

Lets the user toggle “ranked” mode :param address: The address of the user attempting to toggle the mode :param _: The parmaters provided by the parser :param db_session: The database session to use :return: None

classmethod parsers() → List[kudubot.parsing.CommandParser.CommandParser]
Returns

A list of parser the bot supports for commands

classmethod version() → str
Returns

The current version of the bot

otaku_info_bot.OtakuInfoCommandParser module

class otaku_info_bot.OtakuInfoCommandParser.OtakuInfoCommandParser

Bases: kudubot.parsing.CommandParser.CommandParser

Parser for the otaku-info-bot bot

classmethod commands() → List[kudubot.parsing.Command.Command]

Defines the commands the parser supports :return: The list of commands

classmethod name() → str
Returns

The name of the parser

Module contents

otaku_info_bot.sentry_dsn = 'https://f5b72befe0c342709546a5ea2e11197b@sentry.namibsun.net/3'

The sentry DSN for this project

otaku_info_bot.version = '0.5.0'

The current version of otaku_info_bot