diff --git a/chiya/cogs/ban.py b/chiya/cogs/ban.py index 948462b8..3740ae68 100644 --- a/chiya/cogs/ban.py +++ b/chiya/cogs/ban.py @@ -61,9 +61,10 @@ async def ban( return await embeds.send_error(ctx=ctx, description="Reason must be less than 1024 characters.") mod_embed = discord.Embed() - mod_embed.title = f"Banning user: {user}" - mod_embed.description = f"{user.mention} was banned by {ctx.user.mention} for: {reason}" + mod_embed.title = f"Banned user: {user}" + mod_embed.description = f"{user.mention} was banned by {ctx.user.mention}" mod_embed.color = 0xCD6D6D + mod_embed.add_field(name="Reason:", value=reason, inline=False) mod_embed.set_author(icon_url=ctx.user.display_avatar, name=ctx.user.name) mod_embed.set_thumbnail(url="https://files.catbox.moe/6hd0uw.png") @@ -121,9 +122,10 @@ async def unban(self, ctx: discord.Interaction, user: discord.User | discord.Mem return await embeds.send_error(ctx=ctx, description="Reason must be less than 1024 characters.") embed = discord.Embed() - embed.title = f"Unbanning user: {user}" - embed.description = f"{user.mention} was unbanned by {ctx.user.mention} for: {reason}" + embed.title = f"Unbanned user: {user}" + embed.description = f"{user.mention} was unbanned by {ctx.user.mention}" embed.color = discord.Color.green() + embed.add_field(name="Reason:", value=reason, inline=False) embed.set_author(icon_url=ctx.user.display_avatar, name=ctx.user.name) embed.set_thumbnail(url="https://files.catbox.moe/qhc82k.png") diff --git a/chiya/cogs/highlight.py b/chiya/cogs/highlight.py index 5896e9aa..b4920ced 100644 --- a/chiya/cogs/highlight.py +++ b/chiya/cogs/highlight.py @@ -63,7 +63,7 @@ async def on_message(self, message: discord.Message) -> None: embed.title = term embed.description = chat embed.color = discord.Color.gold() - embed.add_field(name="Source Message", value=f"[Jump to]({message.jump_url})") + embed.add_field(name="Source Message:", value=f"[Jump to]({message.jump_url})") for subscriber in users: if subscriber == message.author.id or subscriber in active_members: diff --git a/chiya/cogs/kick.py b/chiya/cogs/kick.py index 67d4c851..922dddf4 100644 --- a/chiya/cogs/kick.py +++ b/chiya/cogs/kick.py @@ -51,7 +51,7 @@ async def kick(self, ctx: discord.Interaction, user: discord.User | discord.Memb return await embeds.send_error(ctx=ctx, description="Reason must be less than 1024 characters.") mod_embed = discord.Embed() - mod_embed.title = "Kicked member" + mod_embed.title = f"Kicked member: {user}" mod_embed.description = f"{user.mention} was kicked by {ctx.user.mention}" mod_embed.color = 0xCD6D6D mod_embed.add_field(name="Reason:", value=reason, inline=False) @@ -85,13 +85,13 @@ async def kick(self, ctx: discord.Interaction, user: discord.User | discord.Memb await ctx.followup.send(embed=mod_embed) await log_embed_to_channel(ctx=ctx, embed=mod_embed) - @app_commands.command(name="purgekick", description="Kick a member and delete their recent messages") + @app_commands.command(name="kickpurge", description="Kick a member and delete their recent messages") @app_commands.guilds(config.guild_id) @app_commands.describe(user="The member that will be kicked") @app_commands.describe(reason="The reason why the member is being kicked") @app_commands.describe(daystodelete="Days worth of messages to delete from the member, up to 7") @app_commands.autocomplete(reason=reasons) - async def purgekick( + async def kickpurge( self, ctx: discord.Interaction, user: discord.User | discord.Member, @@ -125,7 +125,7 @@ async def purgekick( deleted_messages = f"{daystodelete} day" if daystodelete == 1 else f"{daystodelete} days" mod_embed = discord.Embed() - mod_embed.title = "Purge-kicked member" + mod_embed.title = f"Purge-kicked member: {user}" mod_embed.description = f"{user.mention} was purge-kicked by {ctx.user.mention}" mod_embed.color = 0xCD6D6D mod_embed.add_field(name="Deleted messages:", value=deleted_messages, inline=False) @@ -151,7 +151,7 @@ async def purgekick( log.mod_id = ctx.user.id log.timestamp = int(ctx.created_at.timestamp()) log.reason = reason - log.type = "purgekick" + log.type = "kickpurge" db.session.add(log) db.session.commit() diff --git a/chiya/cogs/mute.py b/chiya/cogs/mute.py index 0b149101..bea7235c 100644 --- a/chiya/cogs/mute.py +++ b/chiya/cogs/mute.py @@ -61,11 +61,12 @@ async def mute( return await embeds.send_error(ctx=ctx, description="Timeout duration cannot exceed 7 days.") mod_embed = discord.Embed() - mod_embed.title = "Muted member" - mod_embed.description = f"{user.mention} was muted by {ctx.user.mention} for: {reason}" + mod_embed.title = f"Muted member: {user}" + mod_embed.description = f"{user.mention} was muted by {ctx.user.mention}" mod_embed.color = 0xCD6D6D mod_embed.add_field(name="Expires:", value=f"", inline=True) mod_embed.add_field(name="Reason:", value=reason, inline=False) + mod_embed.set_author(icon_url=ctx.user.display_avatar, name=ctx.user.name) mod_embed.set_thumbnail(url="https://files.catbox.moe/6rs4fn.png") user_embed = discord.Embed() @@ -137,10 +138,11 @@ async def unmute( return await embeds.send_error(ctx=ctx, description="Reason must be less than 1024 characters.") mod_embed = discord.Embed() - mod_embed.title = "Unmuted member" + mod_embed.title = f"Unmuted member: {user}" mod_embed.description = f"{user.mention} was unmuted by {ctx.user.mention}" mod_embed.color = discord.Color.green() mod_embed.add_field(name="Reason:", value=reason, inline=False) + mod_embed.set_author(icon_url=ctx.user.display_avatar, name=ctx.user.name) mod_embed.set_thumbnail(url="https://files.catbox.moe/izm83m.png") user_embed = discord.Embed() diff --git a/chiya/cogs/note.py b/chiya/cogs/note.py index 7faf1851..2db49e34 100644 --- a/chiya/cogs/note.py +++ b/chiya/cogs/note.py @@ -36,11 +36,12 @@ async def add_note(self, ctx: discord.Interaction, user: discord.User | discord. db.session.commit() embed = discord.Embed() - embed.title = f"Noting user: {user.name}" + embed.title = f"Noted user: {user}" embed.description = f"{user.mention} was noted by {ctx.user.mention}" embed.color = discord.Color.blurple() embed.add_field(name="ID:", value=log.id, inline=False) embed.add_field(name="Note:", value=log.reason, inline=False) + embed.set_author(icon_url=ctx.user.display_avatar, name=ctx.user.name) embed.set_thumbnail(url="https://i.imgur.com/A4c19BJ.png") await ctx.followup.send(embed=embed) @@ -98,6 +99,7 @@ async def search_mod_actions( embed = discord.Embed() embed.title = "Mod Actions" + embed.color = discord.Color.blurple() embed.set_author(name=user, icon_url=user.display_avatar) formatter = MySource(actions, embed) @@ -132,11 +134,12 @@ async def edit_log(self, ctx: discord.Interaction, id: int, note: str) -> None: user = await self.bot.fetch_user(log.user_id) embed = discord.Embed() - embed.title = f"Edited log: {user.name}" + embed.title = f"Edited log for: {user}" embed.description = f"Log #{id} for {user.mention} was updated by {ctx.user.mention}" embed.color = discord.Color.green() embed.add_field(name="Before:", value=log.display_reason, inline=False) embed.add_field(name="After:", value=note, inline=False) + embed.set_author(icon_url=ctx.user.display_avatar, name=ctx.user.name) embed.set_thumbnail(url="https://i.imgur.com/A4c19BJ.png") await ctx.followup.send(embed=embed) diff --git a/chiya/cogs/purge.py b/chiya/cogs/purge.py index 8ac99ee4..ab9ea99e 100644 --- a/chiya/cogs/purge.py +++ b/chiya/cogs/purge.py @@ -67,8 +67,9 @@ async def purge(self, ctx: discord.Interaction, amount: int, reason: str) -> Non embed = discord.Embed() embed.title = "Purged messages" embed.description = f"{ctx.user.mention} purged {amount} message(s) in {ctx.channel.mention}." - embed.color = discord.Color.red() + embed.color = 0xCD6D6D embed.add_field(name="Reason:", value=reason, inline=False) + embed.set_author(icon_url=ctx.user.display_avatar, name=ctx.user.name) embed.set_thumbnail(url="https://i.imgur.com/EDy6jCp.png") await ctx.channel.purge(limit=amount, bulk=True, before=ctx.created_at) diff --git a/chiya/cogs/reminder.py b/chiya/cogs/reminder.py index 846ba708..78f1cd22 100644 --- a/chiya/cogs/reminder.py +++ b/chiya/cogs/reminder.py @@ -150,7 +150,7 @@ async def edit(self, ctx: discord.Interaction, reminder_id: int, new_message: st db.session.commit() embed = discord.Embed() - embed.title = "Reminder set" + embed.title = "Reminder updated" embed.description = "Your reminder was updated" embed.color = discord.Color.green() embed.add_field(name="ID:", value=str(reminder_id), inline=False) diff --git a/chiya/cogs/ticket.py b/chiya/cogs/ticket.py index 3b2df759..fbacc869 100644 --- a/chiya/cogs/ticket.py +++ b/chiya/cogs/ticket.py @@ -7,6 +7,7 @@ from chiya import db from chiya.config import config from chiya.models import Ticket +from chiya.utils import embeds class TicketCog(commands.Cog): @@ -130,12 +131,10 @@ async def create_ticket(self, ctx: discord.Interaction, button: discord.ui.Butto ticket = discord.utils.get(ctx.guild.text_channels, name=f"ticket-{ctx.user.id}") if ticket: - embed = discord.Embed() - embed.title = "Error:" - embed.description = f"{ctx.user.mention}, you already have a ticket open at: {ticket.mention}" - embed.color = discord.Color.red() - await ctx.response.send_message(embed=embed, ephemeral=True) - return + return await embeds.send_error( + ctx=ctx, + description=f"You already have a ticket open at: {ticket.mention}", + ) modal = TicketSubmissionModal(title="Ticket Submission") await ctx.response.send_modal(modal) diff --git a/chiya/cogs/warn.py b/chiya/cogs/warn.py index a4aa07f2..7ffb5887 100644 --- a/chiya/cogs/warn.py +++ b/chiya/cogs/warn.py @@ -45,7 +45,7 @@ async def warn(self, ctx: discord.Interaction, user: discord.User | discord.Memb return await embeds.send_error(ctx=ctx, description="Reason must be less than 4096 characters.") mod_embed = discord.Embed() - mod_embed.title = "Warned member" + mod_embed.title = f"Warned member: {user}" mod_embed.description = f"{user.mention} was warned by {ctx.user.mention}" mod_embed.color = discord.Color.gold() mod_embed.add_field(name="Reason:", value=reason, inline=False) @@ -53,7 +53,7 @@ async def warn(self, ctx: discord.Interaction, user: discord.User | discord.Memb mod_embed.set_thumbnail(url="https://files.catbox.moe/xbwoe8.png") user_embed = discord.Embed() - user_embed.title = "Uh-oh, you've received a warning!" + user_embed.title = "Uh-oh, you've been warned!" user_embed.description = "If you believe this was a mistake, contact staff." user_embed.color = discord.Color.blurple() user_embed.add_field(name="Server:", value=ctx.guild.name, inline=True)