此插件提供针对 Mystere 的补丁支持,适用于 NoneBot2,开发者无需对现有代码进行任何修改。
插件包含 mnixry/nonebot-plugin-guild-patch。
PS:部分扩展内容正在申请并入 OneBot:查看详情
-
所有事件新增参数:
字段名 数据类型 说明 id string 事件唯一标识符,当事件类型为 message时值同message_id -
send_message动作请求新增参数:字段名 数据类型 说明 origin_event map[string]any 可选,回复事件,当 origin_event字段存在时则为被动消息,否则为主动消息。PS:此处提到的回复不同于 消息段中定义的回复,在 QQ 开放平台中将 消息段中定义的回复 定义为 消息引用(message_reference)
其中
origin_event定义如下:字段名 数据类型 说明 id string 原事件 ID,由 Mystere 分发事件时提供 type string 原事件类型,同 OneBot V11 事件类型 detail_type string 原事件详细类型 [1] sub_type string 原事件子类型(详细类型的下一级类型) [2] -
detail_type定义如下:- 当
type为meta时,值为原事件的meta_event_type; - 当
type为message时,值为原事件的message_type; - 当
type为notice时,值为原事件的notice_type; - 当
type为request时,值为原事件的request_type。
- 当
-
sub_type定义如下:- 当
type为meta时,值为空字符串; - 当
type为message时,值为原事件的sub_type; - 当
type为notice时,值为原事件的sub_type; - 当
type为meta时,值为空字符串;
简而言之就是当原事件参数存在
sub_type时传递原值,否则传递空字符串。 - 当
-
-
send_message动作请求新增参数:字段名 数据类型 说明 origin_event map[string]any 可选,回复事件,当 origin_event字段存在时则为被动消息,否则为主动消息。PS:此处提到的回复不同于 消息段中定义的回复,在 QQ 开放平台中将 消息段中定义的回复 定义为 消息引用(message_reference)
其中
origin_event定义如下(同 OneBot V12 事件类型):字段名 数据类型 说明 id string 原事件 ID type string 原事件类型 detail_type string 原事件详细类型 sub_type string 原事件子类型(详细类型的下一级类型)