From 52f24e5908552b7c5b652f9f20855b753209bc87 Mon Sep 17 00:00:00 2001 From: dkay Date: Wed, 30 Apr 2025 20:01:08 -0700 Subject: [PATCH 1/2] Fix modmail alias command when no aliases defined --- techsupport_bot/commands/modmail.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/techsupport_bot/commands/modmail.py b/techsupport_bot/commands/modmail.py index fbb11cf7..526dd6dc 100644 --- a/techsupport_bot/commands/modmail.py +++ b/techsupport_bot/commands/modmail.py @@ -1386,6 +1386,9 @@ async def list_aliases(self: Self, ctx: commands.context) -> None: description="There are no aliases registered for this guild", ) + await ctx.channel.send(embed=embed) + return + embed = discord.Embed( color=discord.Color.green(), title="Registered aliases for this guild:" ) From 679b1527e858db56b86b758f8f2822ced1d32b0b Mon Sep 17 00:00:00 2001 From: dkay Date: Sat, 3 May 2025 00:28:29 -0700 Subject: [PATCH 2/2] Make modmail no alias use prepare_deny_embed --- techsupport_bot/commands/modmail.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/techsupport_bot/commands/modmail.py b/techsupport_bot/commands/modmail.py index 526dd6dc..aa08a23c 100644 --- a/techsupport_bot/commands/modmail.py +++ b/techsupport_bot/commands/modmail.py @@ -1381,9 +1381,8 @@ async def list_aliases(self: Self, ctx: commands.context) -> None: # Checks if the command was an alias aliases = config.extensions.modmail.aliases.value if not aliases: - embed = auxiliary.generate_basic_embed( - color=discord.Color.green(), - description="There are no aliases registered for this guild", + embed = auxiliary.prepare_deny_embed( + message="There are no aliases registered for this guild", ) await ctx.channel.send(embed=embed)