runbot 0.0.1

QQ client framework
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::{fmt::Debug, sync::Arc};

use crate::{event, connection::BotContext};
use async_trait::async_trait;


#[async_trait]
pub trait MessageProcessor: Send + Sync + Debug {
    async fn process_message(&self, bot_ctx: Arc<BotContext>, message: Arc<event::Message>) -> anyhow::Result<bool>;
}

#[async_trait]
pub trait NoticeProcessor: Send + Sync + Debug {
    async fn process_notice(&self, bot_ctx: Arc<BotContext>, event: Arc<event::Notice>) -> anyhow::Result<bool>;
}