on_command
Method
This is a method of the BotProtocol class in the protocols module.Decorator to register a command handler.
Signature
Parameters
Command name (without /)
Returns
The result of the operation.
Decorator to register a command handler.
This is a method of the BotProtocol class in the protocols module.Decorator to register a command handler.
def on_command(command: str) -> Callable
@bot.on_command("help")
async def handle_help(message: BotMessage):
await bot.send_message(message.channel.channel_id, "Help text...")