diff --git a/pkg/platform/sources/aiocqhttp.py b/pkg/platform/sources/aiocqhttp.py index ebdd56e..bd1b067 100644 --- a/pkg/platform/sources/aiocqhttp.py +++ b/pkg/platform/sources/aiocqhttp.py @@ -173,10 +173,11 @@ class AiocqhttpEventConverter(adapter.EventConverter): if event.message_type == "group": permission = "MEMBER" - if event.sender["role"] == "admin": - permission = "ADMINISTRATOR" - elif event.sender["role"] == "owner": - permission = "OWNER" + if "role" in event.sender: + if event.sender["role"] == "admin": + permission = "ADMINISTRATOR" + elif event.sender["role"] == "owner": + permission = "OWNER" converted_event = mirai.GroupMessage( sender=mirai.models.entities.GroupMember( id=event.sender["user_id"], # message_seq 放哪?