pub struct QqConfig {
pub app_id: String,
pub app_secret: String,
pub bot_token: String,
pub sandbox: bool,
}Expand description
QQ Bot configuration parsed from [channels.qq_bot].
Fields§
§app_id: String§app_secret: String§bot_token: StringBot token (used as a fallback / for sandbox; the live API uses the app-access-token flow derived from app_id + app_secret).
sandbox: boolImplementations§
Source§impl QqConfig
impl QqConfig
Sourcepub fn from_config(config: &RobitConfig) -> Result<Self, String>
pub fn from_config(config: &RobitConfig) -> Result<Self, String>
Extract QQ Bot config from the loaded RobitConfig.
Sourcepub fn gateway_url(&self) -> &str
pub fn gateway_url(&self) -> &str
WebSocket gateway URL.
Sourcepub fn api_base_url(&self) -> &str
pub fn api_base_url(&self) -> &str
HTTP API base URL.
Sourcepub fn access_token_url(&self) -> &str
pub fn access_token_url(&self) -> &str
App access token endpoint.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for QqConfig
impl RefUnwindSafe for QqConfig
impl Send for QqConfig
impl Sync for QqConfig
impl Unpin for QqConfig
impl UnsafeUnpin for QqConfig
impl UnwindSafe for QqConfig
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