Discord.py: on_message_edit() doesn't include the author

Created on 19 Aug 2019  路  1Comment  路  Source: Rapptz/discord.py

Hi, I've an issue with on_message_edit(), I'm trying to log every edited messages but I can't retrieve the message author :

`@bot.event

async def on_message_edit(before, after):

    data = discord.Embed(tittle = str(before.author), description=str(before.channel))
    data.add_field(name="Orgiginal message :", value=str(before.content), inline=False)
    data.add_field(name="Modified message :", value=str(after.content), inline=False)
    await bot.get_channel(channel).send(embed=data)`

This code work except that the before.author is empty

invalid

Most helpful comment

You spelled title wrong as tittle and this is better suited at the discord.py discord server #help channels.

>All comments

You spelled title wrong as tittle and this is better suited at the discord.py discord server #help channels.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Yuvira picture Yuvira  路  18Comments

downloadpizza picture downloadpizza  路  14Comments

TomOrth picture TomOrth  路  15Comments

Mercurial picture Mercurial  路  22Comments

ams2990 picture ams2990  路  14Comments