puniyu_types 0.7.7

puniyu 通用类型库
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::adapter::AdapterApi;
use crate::bot::Bot;
use std::sync::Arc;

#[derive(Debug, Clone)]
pub struct BotContext {
    bot: Arc<Bot>,
}

impl BotContext {
    pub fn new(bot: Arc<Bot>) -> Self {
        Self { bot }
    }
    pub fn api(&self) -> &AdapterApi {
        &self.bot.api
    }
}