twtb.logic.telegram#

Package for the Telegram related logic.

Submodules#

Package Contents#

Functions#

register_hooks(→ None)

Register the hooks in this file.

run_periodical_subscribing(→ None)

Run periodical subscribing to all channels in the database.

run(→ None)

Actually run the bot and attach to it.

run_both_client_and_bot(→ None)

Run both the client and the bot.

register_hooks(bot: telethon.TelegramClient, client: telethon.TelegramClient) None#

Register the hooks in this file.

async run_periodical_subscribing(client: telethon.TelegramClient) None[source]#

Run periodical subscribing to all channels in the database.

Parameters:

client – Telethon’s client object. Must not be bot.

run() None[source]#

Actually run the bot and attach to it.

async run_both_client_and_bot(client: telethon.TelegramClient, bot: telethon.TelegramClient) None[source]#

Run both the client and the bot.