From 2eb3914ede02e75ddd5a8bc95aa5aec877cdf3f4 Mon Sep 17 00:00:00 2001 From: Matthww Date: Sun, 31 Oct 2021 11:27:21 +0100 Subject: [PATCH] hide owner cog from slash command list --- cogs/owner.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/cogs/owner.py b/cogs/owner.py index 9b20fda..19742d7 100644 --- a/cogs/owner.py +++ b/cogs/owner.py @@ -28,7 +28,7 @@ class OwnerCog(commands.Cog): return content.strip("` \n") # Hidden means it won't show up on the default help. - @commands.command(name="load", hidden=True) + @commands.command(name="load", hidden=True, slash_command=False) @commands.is_owner() async def _cog_load(self, ctx: Context, *, cog: str): """Command which Loads a Module.""" @@ -40,7 +40,7 @@ class OwnerCog(commands.Cog): else: await ctx.send("**`SUCCESS`**") - @commands.command(name="unload", hidden=True) + @commands.command(name="unload", hidden=True, slash_command=False) @commands.is_owner() async def _cog_unload(self, ctx, *, cog: str): """Command which Unloads a Module.""" @@ -52,7 +52,7 @@ class OwnerCog(commands.Cog): else: await ctx.send("**`SUCCESS`**") - @commands.command(name="reload", hidden=True) + @commands.command(name="reload", hidden=True, slash_command=False) @commands.is_owner() async def _cog_reload(self, ctx, *, cog: str): """Command which Reloads a Module.""" @@ -65,14 +65,20 @@ class OwnerCog(commands.Cog): else: await ctx.send("**`SUCCESS`**") - @commands.command(name="shutdown", hidden=True) + @commands.command(name="shutdown", hidden=True, slash_command=False) @commands.is_owner() async def shutdown(self, ctx): """Command which shutdowns the bot.""" await ctx.bot.logout() @commands.is_owner() - @commands.command(pass_context=True, hidden=True, name="eval", aliases=["evaluate"]) + @commands.command( + pass_context=True, + hidden=True, + name="eval", + aliases=["evaluate"], + slash_command=False, + ) async def _eval(self, ctx, *, body: str): env = { "bot": self.bot, @@ -167,7 +173,7 @@ class OwnerCog(commands.Cog): await ctx.send(embed=ssfooem) @commands.is_owner() - @commands.command(hidden=True, aliases=["exec"]) + @commands.command(hidden=True, aliases=["exec"], slash_command=False) async def execute(self, ctx, *, text: str): """Do a shell command.""" message = await ctx.send(f"Loading...")