diff --git a/pkg/platform/sources/aiocqhttp.py b/pkg/platform/sources/aiocqhttp.py index ebdd56e5..bd1b0677 100644 --- a/pkg/platform/sources/aiocqhttp.py +++ b/pkg/platform/sources/aiocqhttp.py @@ -173,10 +173,11 @@ def target2yiri(event: aiocqhttp.Event): 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 放哪?