fix(logger): fixed embed timestamp
This commit is contained in:
parent
6fbd2531a8
commit
0f82ddcf7b
1 changed files with 2 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
|||
import time
|
||||
from datetime import UTC, datetime
|
||||
|
||||
import discord
|
||||
from redbot.core import commands
|
||||
|
@ -43,10 +43,9 @@ class Logger(commands.Cog):
|
|||
if c:
|
||||
channel = self.bot.get_channel(c)
|
||||
if channel:
|
||||
embed = discord.Embed(color=discord.Color.from_str(value="#ff470f"))
|
||||
embed = discord.Embed(color=discord.Color.from_str(value="#ff470f"), timestamp=datetime.now(tz=UTC))
|
||||
embed.set_author(name=f"{author.display_name} - Deleted Message", icon_url=author.display_avatar.url)
|
||||
embed.description = bold(text=f"Message sent by {author.mention} deleted in {payload.cached_message.channel.mention}") + content
|
||||
embed.set_footer(text=f"Author: {author.id} | Message ID: {payload.message_id}")
|
||||
embed.timestamp = time.time()
|
||||
|
||||
await channel.send(embed=embed)
|
||||
|
|
Loading…
Reference in a new issue