Merge pull request #888 from Tigrex-Dai/master

fix: 添加了针对报错内容对event.sender中'role'的存在性检查
This commit is contained in:
Junyan Qin 2024-09-22 16:50:55 +08:00 committed by GitHub
commit 3c2db5097a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -173,6 +173,7 @@ class AiocqhttpEventConverter(adapter.EventConverter):
if event.message_type == "group":
permission = "MEMBER"
if "role" in event.sender:
if event.sender["role"] == "admin":
permission = "ADMINISTRATOR"
elif event.sender["role"] == "owner":