pub struct BotConfig {
pub token: String,
pub platform: String,
pub use_webhooks: bool,
pub webhook_url: Option<String>,
pub polling_interval: u64,
pub command_prefix: String,
pub extra: HashMap<String, Value>,
}Expand description
Configuration for a bot.
Fields§
§token: StringBot token for authentication
platform: StringPlatform name (telegram, discord, slack, etc.)
use_webhooks: boolWhether to use webhooks (vs polling)
webhook_url: Option<String>Webhook URL (if use_webhooks is true)
polling_interval: u64Polling interval in seconds
command_prefix: StringCommand prefix (default: “/”)
extra: HashMap<String, Value>Additional platform-specific configuration
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for BotConfig
impl<'de> Deserialize<'de> for BotConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for BotConfig
impl RefUnwindSafe for BotConfig
impl Send for BotConfig
impl Sync for BotConfig
impl Unpin for BotConfig
impl UnwindSafe for BotConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more