From 4cbddbcf37a2969bc3221d49d48bd61d3e233a53 Mon Sep 17 00:00:00 2001 From: willkyu <87601487+willkyu@users.noreply.github.com> Date: Mon, 11 Mar 2024 19:17:16 +0800 Subject: [PATCH] Update onebotSDK.py --- OlivOS/adapter/onebotV11/onebotSDK.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OlivOS/adapter/onebotV11/onebotSDK.py b/OlivOS/adapter/onebotV11/onebotSDK.py index 17dc03c9..bee91c75 100644 --- a/OlivOS/adapter/onebotV11/onebotSDK.py +++ b/OlivOS/adapter/onebotV11/onebotSDK.py @@ -63,7 +63,7 @@ def send_onebot_post_json(self): try: # clear_dict = {k: v for k, v in self.obj.__dict__.items() if v != -1} clear_dict = self.obj.__dict__ - if clear_dict['message_type']=='private': + if clear_dict.get('message_type')=='private': clear_dict.pop('group_id','No "group_id"') json_str_tmp = json.dumps(obj=clear_dict, ensure_ascii=False) tmp_host = self.bot_info.host