Skip to content

Commit

Permalink
解决无法识别的群消息导致onebotSDK崩溃
Browse files Browse the repository at this point in the history
  • Loading branch information
lunzhiPenxil committed Jan 13, 2022
1 parent d6f30ba commit 83d5810
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion OlivOS/onebotSDK.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,10 @@ def get_Event_from_SDK(target_event):
target_event.data.extend['sub_self_id'] = target_event.sdk_event.json['self_tiny_id']
if target_event.sdk_event.json['user_id'] == target_event.sdk_event.json['self_tiny_id']:
target_event.active = False
if target_event.data.raw_message == '':
if target_event.data != None:
if target_event.data.raw_message == '':
target_event.active = False
else:
target_event.active = False
elif target_event.base_info['type'] == 'notice':
if target_event.sdk_event.json['notice_type'] == 'group_upload':
Expand Down

0 comments on commit 83d5810

Please sign in to comment.