AllMsgEvent

Type Alias AllMsgEvent 

Source
pub type AllMsgEvent = MsgEvent;
👎Deprecated since 0.11.0: 请使用 MsgEvent 代替

Aliased Type§

pub struct AllMsgEvent {
Show 17 fields pub time: i64, pub self_id: i64, pub post_type: PostType, pub message_type: String, pub sub_type: String, pub message: Message, pub message_id: i32, pub group_id: Option<i64>, pub user_id: i64, pub anonymous: Option<Anonymous>, pub raw_message: String, pub font: i32, pub sender: Sender, pub text: Option<String>, pub human_text: String, pub original_json: Value, pub api_tx: Sender<(SendApi, Option<Sender<Result<ApiReturn, ApiReturn>>>)>,
}

Fields§

§time: i64

事件发生的时间戳

§self_id: i64

收到事件的机器人 登陆号

§post_type: PostType

上报类型

§message_type: String

消息类型

§sub_type: String

消息子类型,如果是好友则是 friend,如果是群临时会话则是 group

§message: Message

消息内容

§message_id: i32

消息 ID

§group_id: Option<i64>

群号

§user_id: i64

发送者号

§anonymous: Option<Anonymous>

匿名信息,如果不是匿名消息则为 null

§raw_message: String

原始消息内容

§font: i32

字体

§sender: Sender

发送人信息

§text: Option<String>

处理过的纯文本,如果是纯图片或无文本,此处为None

§human_text: String

处理过的文本,会解析成人类易读形式,里面会包含[image][face]等解析后字符串

§original_json: Value

原始的onebot消息,已处理成json格式

§api_tx: Sender<(SendApi, Option<Sender<Result<ApiReturn, ApiReturn>>>)>

不推荐的消息发送方式