Command Map

class telegram_bot_discussion.command.commands_map.CommandsMap(*commands)[source]

Bases: object

CommandsMap defines the accordance between an action and a Command class. It is needed for CommandsHandler to find what Command was called.

Parameters:

commands (Type[Command])

add(x)[source]
Return type:

CommandsMap

Parameters:

x (Type[Command])

search(x)[source]
Return type:

Optional[Type[Command]]

Parameters:

x (str | Type[Command])