xkcd_bot package

Submodules

xkcd_bot.XkcdBot module

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

Bases: kudubot.Bot.Bot

The Xkcd Bot class that defines the bot’s functionality

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

classmethod name() → str
Returns

The name of the bot

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

Sends the newest XKCD comic :param address: The user’s address :param _: The arguments for the command :param db_session: The database session to use :return: None

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

Sends a specific XKCD comic :param address: The user’s address :param args: The arguments for the command :param db_session: The database session to use :return: None

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

Creates a new subscription for the user :param address: The user’s address :param _: The arguments for the command :param db_session: The database session to use :return: None

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

Unsubscribes a user :param address: The user’s address :param _: The arguments for the command :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

xkcd_bot.XkcdCommandParser module

class xkcd_bot.XkcdCommandParser.XkcdCommandParser

Bases: kudubot.parsing.CommandParser.CommandParser

Parser for the xkcd-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

xkcd_bot.sentry_dsn = 'https://20f54d9cc7ee4e9f94160138ce8f21a3@sentry.namibsun.net/11'

The sentry DSN for this project

xkcd_bot.version = '0.2.1'

The current version of xkcd_bot