mirror of
https://github.com/RockChinQ/QChatGPT.git
synced 2024-11-16 11:42:44 +08:00
Update aiocqhttp.py
针对报错对"role"做存在性检查
This commit is contained in:
parent
ee0d6dcdae
commit
ce56f79687
|
@ -173,6 +173,7 @@ class AiocqhttpEventConverter(adapter.EventConverter):
|
||||||
if event.message_type == "group":
|
if event.message_type == "group":
|
||||||
permission = "MEMBER"
|
permission = "MEMBER"
|
||||||
|
|
||||||
|
if "role" in event.sender:
|
||||||
if event.sender["role"] == "admin":
|
if event.sender["role"] == "admin":
|
||||||
permission = "ADMINISTRATOR"
|
permission = "ADMINISTRATOR"
|
||||||
elif event.sender["role"] == "owner":
|
elif event.sender["role"] == "owner":
|
||||||
|
|
Loading…
Reference in New Issue
Block a user