BotConfig
Defined in the bots module.Rust AI Agent SDK Configuration for a bot.
Fields
| Name | Type | Description |
|---|---|---|
token | String | Bot token for authentication |
platform | String | Platform name (telegram, discord, slack, etc.) |
use_webhooks | bool | Whether to use webhooks (vs polling) |
webhook_url | Option<String> | Webhook URL (if use_webhooks is true) |
polling_interval | u64 | Polling interval in seconds |
default | "/") | - |
command_prefix | String | Command prefix (default: ”/“) |
extra | HashMap<String | Additional platform-specific configuration |
serde_json | :Value> | Additional platform-specific configuration |
Methods
new
| Name | Type |
|---|---|
token | impl Into<String> |
platform | impl Into<String> |
webhooks
| Name | Type |
|---|---|
url | impl Into<String> |
polling_interval
| Name | Type |
|---|---|
seconds | u64 |
command_prefix
| Name | Type |
|---|---|
prefix | impl Into<String> |
extra
| Name | Type |
|---|---|
key | impl Into<String> |
value | serde_json::Value |
Source
View on GitHub
praisonai/src/bots/mod.rs at line 375
