From cd33ebc33cf33e5836221123c828aadc98077906 Mon Sep 17 00:00:00 2001 From: Soheab <33902984+Soheab@users.noreply.github.com> Date: Tue, 5 Nov 2024 08:54:22 +0100 Subject: [PATCH] Add 'close' as alias to 'solved' --- cogs/dpy.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cogs/dpy.py b/cogs/dpy.py index 2691a7ec..e0314c1b 100644 --- a/cogs/dpy.py +++ b/cogs/dpy.py @@ -519,7 +519,7 @@ async def mark_as_solved(self, thread: discord.Thread, user: discord.abc.User) - reason=f'Marked as solved by {user} (ID: {user.id})', ) - @commands.command(name='solved', aliases=['is_solved']) + @commands.command(name='solved', aliases=['is_solved', 'close']) @commands.cooldown(1, 20, commands.BucketType.channel) @is_help_thread() async def solved(self, ctx: GuildContext): @@ -527,7 +527,7 @@ async def solved(self, ctx: GuildContext): assert isinstance(ctx.channel, discord.Thread) - if can_close_threads(ctx) and ctx.invoked_with == 'solved': + if can_close_threads(ctx) and ctx.invoked_with in ('solved', 'close'): await ctx.message.add_reaction(ctx.tick(True)) await self.mark_as_solved(ctx.channel, ctx.author) else: