Skip to content
This repository was archived by the owner on Oct 2, 2023. It is now read-only.

Commit 8ec1f05

Browse files
committed
Added Username and Avatar to Delete,Edit Log
1 parent 6c5ccf4 commit 8ec1f05

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

moderation/logging/cog.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ async def on_message_edit(self, before: Message, after: Message):
181181
return
182182
await redis.delete(key)
183183
embed = Embed(title=t.message_edited, color=Colors.edit, timestamp=datetime.utcnow())
184+
embed.set_author(name=str(before.author), icon_url=before.author.avatar_url)
184185
embed.add_field(name=t.channel, value=before.channel.mention)
185186
embed.add_field(name=t.author, value=before.author.mention)
186187
embed.add_field(name=t.url, value=before.jump_url, inline=False)
@@ -218,6 +219,7 @@ async def on_message_delete(self, message: Message):
218219
return
219220

220221
embed = Embed(title=t.message_deleted, color=Colors.delete, timestamp=datetime.utcnow())
222+
embed.set_author(name=str(message.author), icon_url=message.author.avatar_url)
221223
embed.add_field(name=t.channel, value=message.channel.mention)
222224
embed.add_field(name=t.author, value=message.author.mention)
223225
add_field(embed, t.old_content, message.content)

0 commit comments

Comments
 (0)