From 3d6ad2e8255761e33adb1b3789c1bf4bf79126cc Mon Sep 17 00:00:00 2001 From: Ryuga Date: Thu, 29 Jan 2026 05:14:44 +0530 Subject: [PATCH] Minor update --- bot/cogs/security.py | 6 +++--- bot/utils/embed_handler.py | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/bot/cogs/security.py b/bot/cogs/security.py index a0f1817d..4c2cfbe6 100644 --- a/bot/cogs/security.py +++ b/bot/cogs/security.py @@ -8,7 +8,7 @@ from discord import Member, Message from bot import constants -from bot.utils.embed_handler import info, moderation_log_embed, simple_embed +from bot.utils.embed_handler import info, moderation_log_embed from bot.utils.message_handler import RemovableMessage from bot.constants import allowed_file_extensions @@ -115,11 +115,11 @@ async def archive_and_delete_message( embed = moderation_log_embed( title=title, - user=f"{message.author} (`{message.author.id}`)", channel=message.channel.mention, content=f"{reason}\n\n{content}", color=discord.Color.red() ) + embed.set_footer(text=f"Author: {message.author}", icon_url=message.author.avatar.url) await self.log_channel.send(embed=embed, files=files_to_log) @@ -297,7 +297,7 @@ async def on_message_edit(self, msg_before, msg_after): # Log that the message was edited for security reasons msg = ( - f"**Channel:** {msg_before.channel.mention}\n\n" + f"**Channel**\n{msg_before.channel.mention}\n" f"**Before:** {msg_before.content}\n" f"**After: **{msg_after.content}\n\n" f"[jump]({msg_after.jump_url})" diff --git a/bot/utils/embed_handler.py b/bot/utils/embed_handler.py index 09662860..21d1230b 100644 --- a/bot/utils/embed_handler.py +++ b/bot/utils/embed_handler.py @@ -393,13 +393,11 @@ def project_embed(projects: dict, me): def moderation_log_embed( *, title: str, - user: str, channel: str, content: str, color: Color ) -> Embed: embed = Embed(title=title, color=color) - embed.add_field(name="User", value=user, inline=False) embed.add_field(name="Channel", value=channel, inline=False) embed.add_field(name="Content", value=content[:1024], inline=False) return embed