Documentation Index
Fetch the complete documentation index at: https://docs.praison.ai/llms.txt
Use this file to discover all available pages before exploring further.
BotUser
Defined in the bots module.
Rust AI Agent SDK
Represents a user in a messaging platform.
Fields
| Name | Type | Description |
|---|
user_id | String | Platform-specific user identifier |
username | Option<String> | User’s username (if available) |
display_name | Option<String> | User’s display name |
is_bot | bool | Whether this user is a bot |
metadata | HashMap<String | Additional platform-specific metadata |
serde_json | :Value> | Additional platform-specific metadata |
Methods
new
fn new(user_id: impl Into<String>) -> Self
Create a new bot user.
Parameters:
| Name | Type |
|---|
user_id | impl Into<String> |
username
fn username(mut self, username: impl Into<String>) -> Self
Set username.
Parameters:
| Name | Type |
|---|
username | impl Into<String> |
display_name
fn display_name(mut self, name: impl Into<String>) -> Self
Set display name.
Parameters:
| Name | Type |
|---|
name | impl Into<String> |
is_bot
fn is_bot(mut self, is_bot: bool) -> Self
Set is_bot flag.
Parameters:
fn metadata(mut self, key: impl Into<String>, value: serde_json::Value) -> Self
Add metadata.
Parameters:
| Name | Type |
|---|
key | impl Into<String> |
value | serde_json::Value |
Source
View on GitHub
praisonai/src/bots/mod.rs at line 85