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

NameTypeDescription
channel_idStringPlatform-specific channel identifier
nameOption<String>Channel name (if available)
channel_typeStringType of channel (dm, group, channel, thread)
metadataHashMap<StringAdditional platform-specific metadata
serde_json:Value>Additional platform-specific metadata

Methods

new

rust
fn new(channel_id: impl Into<String>) -> Self

Create a new bot channel.

Parameters:

NameType
channel_idimpl Into&lt;String&gt;

name

rust
fn name(mut self, name: impl Into<String>) -> Self

Set channel name.

Parameters:

NameType
nameimpl Into&lt;String&gt;

channel_type

rust
fn channel_type(mut self, channel_type: impl Into<String>) -> Self

Set channel type.

Parameters:

NameType
channel_typeimpl Into&lt;String&gt;

metadata

rust
fn metadata(mut self, key: impl Into<String>, value: serde_json::Value) -> Self

Add metadata.

Parameters:

NameType
keyimpl Into&lt;String&gt;
valueserde_json::Value

Source

View on GitHub

praisonai/src/bots/mod.rs at line 148


Related Documentation