We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b3d9d80 commit e6eccfcCopy full SHA for e6eccfc
1 file changed
nonebot/adapters/qq/message.py
@@ -650,11 +650,14 @@ def content_type(seg: QQAttachment):
650
for seg in message.attachments
651
if seg.url
652
)
653
- mentions = {
654
- m.id: m
655
- for m in getattr(message, "mentions", [])
656
- if isinstance(m, GroupMentionUser)
657
- }
+
+ if isinstance(message, QQMessage) and message.mentions:
+ mentions = {
+ m.id: m for m in message.mentions if isinstance(m, GroupMentionUser)
+ }
658
+ else:
659
+ mentions = {}
660
661
ats = msg["mention_user"]
662
if not ats:
663
for mention in mentions.values():
0 commit comments