> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Bot Channel • Rust AI Agent SDK

> BotChannel: Represents a channel/chat in a messaging platform.

# BotChannel

> Defined in the [**bots**](../modules/bots) module.

<Badge color="orange">Rust AI Agent SDK</Badge>

Represents a channel/chat in a messaging platform.

## Fields

| Name           | Type                   | Description                                  |
| -------------- | ---------------------- | -------------------------------------------- |
| `channel_id`   | `String`               | Platform-specific channel identifier         |
| `name`         | `Option&lt;String&gt;` | Channel name (if available)                  |
| `channel_type` | `String`               | Type of channel (dm, group, channel, thread) |
| `metadata`     | `HashMap&lt;String`    | Additional platform-specific metadata        |
| `serde_json`   | `:Value&gt;`           | Additional platform-specific metadata        |

## Methods

### `new`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn new(channel_id: impl Into<String>) -> Self
```

Create a new bot channel.

**Parameters:**

| Name         | Type                      |
| ------------ | ------------------------- |
| `channel_id` | `impl Into&lt;String&gt;` |

### `name`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn name(mut self, name: impl Into<String>) -> Self
```

Set channel name.

**Parameters:**

| Name   | Type                      |
| ------ | ------------------------- |
| `name` | `impl Into&lt;String&gt;` |

### `channel_type`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn channel_type(mut self, channel_type: impl Into<String>) -> Self
```

Set channel type.

**Parameters:**

| Name           | Type                      |
| -------------- | ------------------------- |
| `channel_type` | `impl Into&lt;String&gt;` |

### `metadata`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn metadata(mut self, key: impl Into<String>, value: serde_json::Value) -> Self
```

Add metadata.

**Parameters:**

| Name    | Type                      |
| ------- | ------------------------- |
| `key`   | `impl Into&lt;String&gt;` |
| `value` | `serde_json::Value`       |

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-rust/praisonai/src/bots/mod.rs#L148">
  `praisonai/src/bots/mod.rs` at line 148
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Rust Bots" icon="robot" href="/docs/rust/bots" />

  <Card title="Rust AGUI" icon="display" href="/docs/rust/agui" />
</CardGroup>
