diff options
author | ziro <palembani@gmail.com> | 2020-08-05 06:09:20 +0000 |
---|---|---|
committer | ziro <palembani@gmail.com> | 2020-08-05 06:09:20 +0000 |
commit | 8b9eb356e8a81d9b7eba8268a5e3bafbbe355ca0 (patch) | |
tree | a296f5f5e47568eba668743714389c70f116ca0e /cogs/moderator.py | |
parent | f7b54808be04d550283de15faf31a53f364e5de6 (diff) | |
download | steve-bot-8b9eb356e8a81d9b7eba8268a5e3bafbbe355ca0.tar steve-bot-8b9eb356e8a81d9b7eba8268a5e3bafbbe355ca0.tar.gz steve-bot-8b9eb356e8a81d9b7eba8268a5e3bafbbe355ca0.tar.bz2 steve-bot-8b9eb356e8a81d9b7eba8268a5e3bafbbe355ca0.tar.lz steve-bot-8b9eb356e8a81d9b7eba8268a5e3bafbbe355ca0.tar.xz steve-bot-8b9eb356e8a81d9b7eba8268a5e3bafbbe355ca0.tar.zst steve-bot-8b9eb356e8a81d9b7eba8268a5e3bafbbe355ca0.zip |
+ Cleaning Up & Added Warning if bot doesn't have certain perm
Diffstat (limited to 'cogs/moderator.py')
-rw-r--r-- | cogs/moderator.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/cogs/moderator.py b/cogs/moderator.py index 15e9d18..b0808a1 100644 --- a/cogs/moderator.py +++ b/cogs/moderator.py @@ -8,13 +8,13 @@ class Admin(commands.Cog): @commands.command(aliases=['quit'], hidden=True) @commands.has_any_role("Server Moderator","Zi") - async def force_exit(self, ctx): + async def force_close(self, ctx): await ctx.send("Self Destructing!") await ctx.bot.close() - @commands.command(aliases=['unload'], hidden=True) + @commands.command(hidden=True) @commands.has_any_role("Server Moderator","Zi") - async def _unload(self, ctx, ext): + async def unload(self, ctx, ext): await ctx.send(f"Unloading {ext}...") try: self.bot.unload_extension(f'cogs.{ext}') @@ -26,9 +26,9 @@ class Admin(commands.Cog): except commands.ExtensionFailed: await ctx.send(f"{ext} failed to unload!") - @commands.command(aliases=['reload'], hidden=True) + @commands.command(hidden=True) @commands.has_any_role("Server Moderator","Zi") - async def _reload(self, ctx, ext): + async def reload(self, ctx, ext): await ctx.send(f"Reloading {ext}...") try: self.bot.reload_extension(f'cogs.{ext}') @@ -40,9 +40,9 @@ class Admin(commands.Cog): except commands.ExtensionFailed: await ctx.send(f"{ext} failed to reload!") - @commands.command(aliases=['load'], hidden=True) + @commands.command(hidden=True) @commands.has_any_role("Server Moderator","Zi") - async def _load(self, ctx, ext): + async def load(self, ctx, ext): await ctx.send(f"Loading {ext}...") try: self.bot.load_extension(f"cogs.{ext}") @@ -52,9 +52,9 @@ class Admin(commands.Cog): except commands.ExtensionFailed: await ctx.send(f"{ext} failed to load!") - @commands.command(aliases=['clearchat'], hidden=True) + @commands.command(aliases=['cc'], hidden=True) @commands.has_any_role("Server Moderator","Zi") - async def _clearchat(self, ctx, numb: int=50): + async def clearchat(self, ctx, numb: int=50): deleted_msg = await ctx.message.channel.purge(limit=int(numb)+1, check=None, before=None, after=None, around=None, oldest_first=False, bulk=True) msg_num = max(len(deleted_msg) - 1, 0) |