Discord.py 编辑的消息记录器不起作用

时间:2020-12-19 19:08:01

标签: discord bots discord.py discord.py-rewrite

每当我运行这个函数时,我总是收到错误消息“AttributeError: 'Message' object has no attribute 'member'”,但是我不太确定这是什么意思。我该如何解决这个问题?

@client.event
    async def on_message_edit(message_before, message_after):
        embed=discord.Embed(title="{} edited a message".format(message_before.member.name), description="", color="Blue")
        embed.add_field(name= message_before.content ,value="This is the message before any edit", inline=True)
        embed.add_field(name= message_after.content ,value="This is the message after the edit", inline=True)
        archive_edit=client.get_channel(789929258184474675) #Grabs the ID of the Edited Messages Channel where the archive is to be stored.
        await archive_edit.send(embed=embed) #Sends the deleted message using the Fancy Chaim Embed        

0 个答案:

没有答案
相关问题