From b358a9cf69e146713e40445658f23c8919e4e86e Mon Sep 17 00:00:00 2001 From: thanos Date: Wed, 7 May 2025 17:56:31 -0400 Subject: [PATCH] fix(afk): make afk command responses ephemeral --- tux/cogs/utility/afk.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tux/cogs/utility/afk.py b/tux/cogs/utility/afk.py index 513cd317..cd30d55f 100644 --- a/tux/cogs/utility/afk.py +++ b/tux/cogs/utility/afk.py @@ -53,13 +53,14 @@ async def afk( await add_afk(self.db, shortened_reason, target, ctx.guild.id, False) - await ctx.send( + await ctx.reply( content="\N{SLEEPING SYMBOL} || You are now afk! " + f"Reason: `{shortened_reason}`", allowed_mentions=discord.AllowedMentions( users=False, everyone=False, roles=False, ), + ephemeral=True, ) @commands.hybrid_command(name="permafk") @@ -84,7 +85,7 @@ async def permafk(self, ctx: commands.Context[Tux], *, reason: str = "No reason. entry = await self.db.afk.get_afk_member(target.id, guild_id=ctx.guild.id) if entry is not None: await del_afk(self.db, target, entry.nickname) - await ctx.send("Welcome back!") + await ctx.send("Welcome back!", ephemeral=True) return shortened_reason = textwrap.shorten(reason, width=100, placeholder="...") @@ -99,6 +100,7 @@ async def permafk(self, ctx: commands.Context[Tux], *, reason: str = "No reason. everyone=False, roles=False, ), + ephemeral=True, ) @commands.Cog.listener("on_message")