Struct miraie::Bot [−][src]
pub struct Bot { /* fields omitted */ }
Expand description
Bot
用来保存一个 bot 中的状态,如消息队列、跟连接的沟通、数据库连接等。
Implementations
pub async fn new(
addr: SocketAddr,
verify_key: impl Into<String>,
qq: QQ
) -> Result<(Self, Connection)>
pub async fn new(
addr: SocketAddr,
verify_key: impl Into<String>,
qq: QQ
) -> Result<(Self, Connection)>
对 mirai bot 发送一个请求,默认超时 10s,如果需要调整超时,使用 Self::request_timeout
。
对 mirai bot 发送一个请求,带有自定义超时
获取一个全部群聊消息的 stream
获取一个私聊消息的 stream
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Bot
impl !UnwindSafe for Bot
Blanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self
pub fn vzip(self) -> V