Bot Channel • Rust AI Agent SDK
BotChannel: Represents a channel/chat in a messaging platform.
BotChannel
Defined in the bots module.
Rust AI Agent SDK
Represents a channel/chat in a messaging platform.
Fields
| Name | Type | Description |
|---|---|---|
channel_id | String | Platform-specific channel identifier |
name | Option<String> | Channel name (if available) |
channel_type | String | Type of channel (dm, group, channel, thread) |
metadata | HashMap<String | Additional platform-specific metadata |
serde_json | :Value> | Additional platform-specific metadata |
Methods
new
fn new(channel_id: impl Into<String>) -> SelfCreate a new bot channel.
Parameters:
| Name | Type |
|---|---|
channel_id | impl Into<String> |
name
fn name(mut self, name: impl Into<String>) -> SelfSet channel name.
Parameters:
| Name | Type |
|---|---|
name | impl Into<String> |
channel_type
fn channel_type(mut self, channel_type: impl Into<String>) -> SelfSet channel type.
Parameters:
| Name | Type |
|---|---|
channel_type | impl Into<String> |
metadata
fn metadata(mut self, key: impl Into<String>, value: serde_json::Value) -> SelfAdd metadata.
Parameters:
| Name | Type |
|---|---|
key | impl Into<String> |
value | serde_json::Value |
Source
View on GitHubpraisonai/src/bots/mod.rs at line 148