Functions
- telegram_bot_discussion.functions.chat_id.get_chat_id(update, context=None)[source]
get_chat_id() try fetch chat_id (from update.message, update.callback_query or context) of initiator (it can be User, Chat, Channel), which appeal to Telegram-bot.
- Raises:
ChatIdWasNotFetched – When initiator was not detected.
- Return type:
int- Parameters:
update (Update)
context (CallbackContext | None)
- exception telegram_bot_discussion.functions.from_user.FromUserWasNotFetched[source]
Bases:
Exception
- telegram_bot_discussion.functions.from_user.get_from_user(update)[source]
get_from_user() try fetch User (from update.message, update.callback_query) of initiator (it can be User, Chat, Channel), which appeal to Telegram-bot.
- Raises:
FromUserWasNotFetched – When initiator was not detected.
- Return type:
User- Parameters:
update (Update)
- telegram_bot_discussion.functions.from_id.get_from_id(update, context=None)[source]
get_from_id() try fetch from_user.id (from update.message, update.callback_query or context) of initiator (User), which appeal to Telegram-bot.
- Raises:
FromIdWasNotFetched – When initiator ID was not detected.
- Return type:
int- Parameters:
update (Update)
context (CallbackContext | None)
- telegram_bot_discussion.functions.message.get_message(update)[source]
get_message() try fetch user_id (from update.message, update.callback_query) of initiator (it can be User, Chat, Channel), which appeal to Telegram-bot.
- Raises:
MessageWasNotFetched – When message of initiator was not detected.
- Return type:
Union[MaybeInaccessibleMessage,Message]- Parameters:
update (Update)