Skip to content

机器人如何获取QQ群内用户发送的文件? #228

@Westlife1002

Description

@Westlife1002

目前监听群消息的方法:

    async def on_group_at_message_create(self, message: GroupMessage):
        print("收到群消息!!!!:", message.content)

目前这个方法,只能监听到专门@机器人的文字消息和图片附件(截图可以复制到QQ聊天对话框中和文字一并发送)。但群成员发送其他文档,比如PDF、EXCEL、WORD文档,发送时是无法@机器人的,只能直接发送到群里。这时候机器人无法监听和获取到该文件。

如何让QQ机器人能够监听和捕捉到群内成员发送的群文件?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions