BotConfig
Defined in the config module.AI Agent Configuration for messaging bots. Attributes: token: Bot authentication token webhook_url: URL for webhook mode (optional) webhook_path: Path for webhook endpoint polling_interval: Interval for polling mode (seconds) allowed_users: List of explicitly-allowed user IDs. When empty, inbound access is not automatically granted — it defers to
unknown_user_policy (default deny). To open the bot to
everyone, set unknown_user_policy="allow".
allowed_channels: List of allowed channel IDs (empty = all allowed)
command_prefix: Prefix for commands (default: ”/”)
mention_required: Whether bot mention is required in groups
typing_indicator: Whether to show typing indicator
max_message_length: Maximum message length before splitting
retry_attempts: Number of retry attempts for failed operations
timeout: Request timeout in seconds
metadata: Additional platform-specific configuration
Properties
str
No description available.
str
No description available.
Optional[str]
No description available.
str
No description available.
int
No description available.
float
No description available.
List[str]
No description available.
List[str]
No description available.
str
No description available.
bool
No description available.
bool
No description available.
int
No description available.
int
No description available.
int
No description available.
bool
No description available.
int
No description available.
str
No description available.
List[str]
No description available.
bool
No description available.
int
No description available.
str
No description available.
str
No description available.
int
No description available.
str
No description available.
str
No description available.
Optional[str]
No description available.
str
No description available.
str
No description available.
UnknownUserPolicy
No description available.
Optional[str]
No description available.
bool
No description available.
int
No description available.
bool
No description available.
Optional[str]
No description available.
Dict[str, Any]
No description available.
Methods
is_webhook_mode()
Whether bot is configured for webhook mode.
is_ws_mode()
Whether bot is configured for WebSocket mode.
is_hybrid_mode()
Whether bot is configured for hybrid mode (WS + slow poll).
is_user_allowed()
Check if a user is allowed to interact with the bot.
is_explicitly_allowed()
Whether a user is explicitly allow-listed.
is_channel_allowed()
Check if a channel is allowed for bot interaction.
Internal & Generic Methods
Internal & Generic Methods
- to_dict: Convert to dictionary (hides sensitive data).
Source
View on GitHub
praisonaiagents/bots/config.py at line 14
