Button
- class telegram_bot_discussion.button.button.Button(chat_id, recipient_id=None, **kwargs)[source]
Bases:
ABCButton is base class for creating Telegram-button.
- Parameters:
chat_id (int)
recipient_id (int)
- class Meta[source]
Bases:
ButtonMeta
-
chat_id:
int
-
recipient_id:
int
- abstractmethod async classmethod on_click(update, context)[source]
Reaction to a user’s button click
- Parameters:
update (Update)
context (CallbackContext)
- set_title(title)[source]
Method for force set Telegram-button title
- Return type:
- Parameters:
title (str)
- equals(other, callback_data_coder)[source]
Method for comparing a Button object with another Button object or a native Telegram-button (e.g. InlineKeyboardButton).
- Return type:
bool- Parameters:
other (Type[Button] | InlineKeyboardButton)
callback_data_coder (CoderInterface)
- as_button(callback_data_coder)[source]
Method for create Telegram-button
- Return type:
InlineKeyboardButton- Parameters:
callback_data_coder (CoderInterface)