From 7f50490ae057676b1982a0b246a2428a10a7694d Mon Sep 17 00:00:00 2001 From: Luke Robles Date: Sun, 6 Nov 2022 08:25:14 -0800 Subject: [PATCH] move topic command to be a slash command --- app/cogs/server_utils.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/app/cogs/server_utils.py b/app/cogs/server_utils.py index ac5dd63d..2386a13b 100644 --- a/app/cogs/server_utils.py +++ b/app/cogs/server_utils.py @@ -249,12 +249,14 @@ class ServerUtils(commands.Cog): else: await ctx.reply(embed=help_methods.get_help_embed(self.bot)) - @commands.command(name="topic") - async def topic(self, ctx: commands.Context, *, new_channel_topic): - if ctx.message.author.id != core_utils.my_id: + @commands.slash_command( + guild_ids=None, name="topic", description="Change the channel's topic" + ) + @option(name="new_channel_topic", description="The new topic", required=True) + async def topic(self, ctx, new_channel_topic): + if ctx.author.id != core_utils.my_id: return - await ctx.message.delete() - await ctx.message.channel.edit(topic=new_channel_topic) + await ctx.channel.edit(topic=new_channel_topic) def setup(bot):