Class CommandManager
The CommandManager class is responsible for managing commands and setting bot commands for the client. It is available in the Evogram instance object as commands.
Constructor
client: An instance of theEvogramclass.
Properties
commands: A static property that contains an array of all registeredCommandobjects.
Methods
setBotCommands(): A method that sets bot commands for the client using the setMyCommands API method from the Telegram Bot API based on descriptions provided by registeredCommandobjects. It is used automatically when adding a command.getCommand(message: UserMessageContext): A static method that takes aUserMessageContextobject and returns the correspondingCommandobject if it exists in thecommandsarray. Otherwise, it returnsundefined.