CommandsFlavor
Extends
ts
Context
Properties
setMyCommands
ts
setMyCommands: (commands: CommandGroup<C> | CommandGroup<C>[], options?: SetBotCommandsOptions) => Promise<void>;
Sets the provided commands for the current chat. Cannot be called on updates that don’t have a chat
property.
[!IMPORTANT] Calling this method with upperCased command names registered, will throw
getNearestCommand
ts
getNearestCommand: (commands: CommandGroup<C> | CommandGroup<C>[], options?: Omit<Partial<JaroWinklerOptions>, "language">) => string | null;
Returns the nearest command to the user input. If no command is found, returns null
.
getCommandEntities
ts
getCommandEntities: (commands: CommandGroup<C> | CommandGroup<C>[]) => BotCommandEntity[];