Buttons Map

class telegram_bot_discussion.button.buttons_map.ButtonsMap(*buttons)[source]

Bases: object

ButtonsMap defines the accordance between an action and a Button class. It is needed for ButtonsHandler to find which Button was clicked.

Parameters:

buttons (Type[Button])

add(x)[source]
Return type:

ButtonsMap

Parameters:

x (Type[Button])

search(x)[source]
Return type:

Optional[Type[Button]]

Parameters:

x (str | Type[Button])