Bot Protocol • Rust AI Agent SDK
BotProtocol: Bot protocol for chat integrations.
BotProtocol
Defined in the protocols module.
Rust AI Agent SDK
Bot protocol for chat integrations.
Methods
name
fn name(&self) -> &strGet bot name
on_message
async fn on_message(&self, message: BotMessage) -> Result<BotResponse>Handle incoming message
Parameters:
| Name | Type |
|---|---|
message | BotMessage |
on_command
async fn on_command(&self, command: &str, args: &[&str]) -> Result<BotResponse>Handle command
Parameters:
| Name | Type |
|---|---|
command | &str |
args | &[&str] |
start
async fn start(&mut self) -> Result<()>Start the bot
stop
async fn stop(&mut self) -> Result<()>Stop the bot
Source
View on GitHubpraisonai/src/protocols/mod.rs at line 0