fix(logger): fixed embed timestamp

This commit is contained in:
Seaswimmer 2024-05-24 03:04:40 -04:00
parent 6fbd2531a8
commit 0f82ddcf7b
Signed by: cswimr
GPG key ID: 5D671B5D03D65A7F

View file

@ -1,4 +1,4 @@
import time from datetime import UTC, datetime
import discord import discord
from redbot.core import commands from redbot.core import commands
@ -43,10 +43,9 @@ class Logger(commands.Cog):
if c: if c:
channel = self.bot.get_channel(c) channel = self.bot.get_channel(c)
if channel: 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.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.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.set_footer(text=f"Author: {author.id} | Message ID: {payload.message_id}")
embed.timestamp = time.time()
await channel.send(embed=embed) await channel.send(embed=embed)