Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions bot/cogs/security.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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})"
Expand Down
2 changes: 0 additions & 2 deletions bot/utils/embed_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading