twtb.logic.telegram.subscribe#

Module for subscribing to all channels in the database.

Module Contents#

Functions#

run_periodical_subscribing(→ None)

Run periodical subscribing to all channels in the database.

subscribe_to_all_channels(→ None)

Subscribe to all channels in the database.

get_info_about_channels(→ Set[telethon.tl.types.TypeChat])

Get info about channels from Telegram.

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.

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

Subscribe to all channels in the database.

Parameters:

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

async get_info_about_channels(client: telethon.TelegramClient, channels: Set[str]) Set[telethon.tl.types.TypeChat][source]#

Get info about channels from Telegram.

Parameters:
  • client – Telethon’s client.

  • channels – A list of channels to get info about.

Returns:

Channels’ info.