yyuueexxiinngg / onebot-kotlin

OneBot标准的Kotlin实现及mirai插件 - 原cqhttp-mirai
GNU Affero General Public License v3.0
584 stars 139 forks source link

[Question] 通过群组发起的私聊被判定为群信息 #133

Closed twfx1207 closed 3 years ago

twfx1207 commented 3 years ago

mirai版本:2.0.0 插件版本:OneBot Kotlin 0.3.4

从群组里发起的临时对话在处理时message_type字段不为private导致yobot后端无法处理登录请求。 因为bot正在使用所以尚未进行具体信息debug,仅根据日志判断原因。 日志图片: image

yobot后端处理代码:

        if ctx['message_type'] != 'private':
            return {
                'reply': '请私聊使用',
                'block': True
            }