mirror of
https://github.com/Matthww/TuneBot.git
synced 2026-09-21 23:37:47 +00:00
hide owner cog from slash command list
This commit is contained in:
+12
-6
@@ -28,7 +28,7 @@ class OwnerCog(commands.Cog):
|
|||||||
return content.strip("` \n")
|
return content.strip("` \n")
|
||||||
|
|
||||||
# Hidden means it won't show up on the default help.
|
# 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()
|
@commands.is_owner()
|
||||||
async def _cog_load(self, ctx: Context, *, cog: str):
|
async def _cog_load(self, ctx: Context, *, cog: str):
|
||||||
"""Command which Loads a Module."""
|
"""Command which Loads a Module."""
|
||||||
@@ -40,7 +40,7 @@ class OwnerCog(commands.Cog):
|
|||||||
else:
|
else:
|
||||||
await ctx.send("**`SUCCESS`**")
|
await ctx.send("**`SUCCESS`**")
|
||||||
|
|
||||||
@commands.command(name="unload", hidden=True)
|
@commands.command(name="unload", hidden=True, slash_command=False)
|
||||||
@commands.is_owner()
|
@commands.is_owner()
|
||||||
async def _cog_unload(self, ctx, *, cog: str):
|
async def _cog_unload(self, ctx, *, cog: str):
|
||||||
"""Command which Unloads a Module."""
|
"""Command which Unloads a Module."""
|
||||||
@@ -52,7 +52,7 @@ class OwnerCog(commands.Cog):
|
|||||||
else:
|
else:
|
||||||
await ctx.send("**`SUCCESS`**")
|
await ctx.send("**`SUCCESS`**")
|
||||||
|
|
||||||
@commands.command(name="reload", hidden=True)
|
@commands.command(name="reload", hidden=True, slash_command=False)
|
||||||
@commands.is_owner()
|
@commands.is_owner()
|
||||||
async def _cog_reload(self, ctx, *, cog: str):
|
async def _cog_reload(self, ctx, *, cog: str):
|
||||||
"""Command which Reloads a Module."""
|
"""Command which Reloads a Module."""
|
||||||
@@ -65,14 +65,20 @@ class OwnerCog(commands.Cog):
|
|||||||
else:
|
else:
|
||||||
await ctx.send("**`SUCCESS`**")
|
await ctx.send("**`SUCCESS`**")
|
||||||
|
|
||||||
@commands.command(name="shutdown", hidden=True)
|
@commands.command(name="shutdown", hidden=True, slash_command=False)
|
||||||
@commands.is_owner()
|
@commands.is_owner()
|
||||||
async def shutdown(self, ctx):
|
async def shutdown(self, ctx):
|
||||||
"""Command which shutdowns the bot."""
|
"""Command which shutdowns the bot."""
|
||||||
await ctx.bot.logout()
|
await ctx.bot.logout()
|
||||||
|
|
||||||
@commands.is_owner()
|
@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):
|
async def _eval(self, ctx, *, body: str):
|
||||||
env = {
|
env = {
|
||||||
"bot": self.bot,
|
"bot": self.bot,
|
||||||
@@ -167,7 +173,7 @@ class OwnerCog(commands.Cog):
|
|||||||
await ctx.send(embed=ssfooem)
|
await ctx.send(embed=ssfooem)
|
||||||
|
|
||||||
@commands.is_owner()
|
@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):
|
async def execute(self, ctx, *, text: str):
|
||||||
"""Do a shell command."""
|
"""Do a shell command."""
|
||||||
message = await ctx.send(f"Loading...")
|
message = await ctx.send(f"Loading...")
|
||||||
|
|||||||
Reference in New Issue
Block a user