twtb.logic.telegram.setup_shared_chat#

Setup shared chat.

Because the user can’t know, what ID has the channel we ask them to send a random generated token into the chat where bot and client are, so in that way we get the ID for both of those.

Module Contents#

Classes#

SharedChatIDContainer

Container for shared chat ID.

Functions#

setup_shared_chat(→ None)

Setup shared chat.

Attributes#

MESSAGE_TOKEN[source]#
async setup_shared_chat(db: twtb.logic.shared.db.sharing_message.SharingMessageInDB) None[source]#

Setup shared chat.

The function will ask user to write a special token to the shared chat. And then, via globals, it will spam into the chat, until the user will write the token.

class SharedChatIDContainer[source]#

Container for shared chat ID.

It’s a global actually, but I don’t know how to do it better.

bot: int | None[source]#
client: int | None[source]#
id_container[source]#