Register Command • AI Agent SDK
register_command: Register a chat command handler.
register_command
Method
</div>
This is a method of the ChatCommandProtocol class in the protocols module.
Register a chat command handler.
Signature
def register_command(name: str, handler: Callable, description: str, usage: Optional[str]) -> NoneParameters
ParamField
strCommand name (without /)
ParamField
CallableAsync callable to handle the command
ParamField
strHuman-readable description
ParamField
Optional[str]Usage example string
Source
View on GitHubpraisonaiagents/bots/protocols.py at line 1328