aboutsummaryrefslogtreecommitdiff
path: root/cogs
diff options
context:
space:
mode:
authorMango0x45 <dogelikestopkekmemes@gmail.com>2020-06-26 11:50:12 +0000
committerMango0x45 <dogelikestopkekmemes@gmail.com>2020-06-26 11:50:12 +0000
commit9f6603da1fad08eb987ee1afaf22d099af43cdd6 (patch)
tree5122bafa9db9ab19b255ae10857e0236f3d233ad /cogs
parenta03418e080fb837899021783b7cf8e2c63cf7880 (diff)
downloadsteve-bot-9f6603da1fad08eb987ee1afaf22d099af43cdd6.tar
steve-bot-9f6603da1fad08eb987ee1afaf22d099af43cdd6.tar.gz
steve-bot-9f6603da1fad08eb987ee1afaf22d099af43cdd6.tar.bz2
steve-bot-9f6603da1fad08eb987ee1afaf22d099af43cdd6.tar.lz
steve-bot-9f6603da1fad08eb987ee1afaf22d099af43cdd6.tar.xz
steve-bot-9f6603da1fad08eb987ee1afaf22d099af43cdd6.tar.zst
steve-bot-9f6603da1fad08eb987ee1afaf22d099af43cdd6.zip
Quick test
Diffstat (limited to 'cogs')
-rw-r--r--cogs/admin.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/cogs/admin.py b/cogs/admin.py
index 489d59a..3fd159a 100644
--- a/cogs/admin.py
+++ b/cogs/admin.py
@@ -13,6 +13,9 @@ class Admin(commands.Cog):
async def is_mod(ctx):
return ctx.author.guild_permissions.manage_channels
+ async def is_botmaster(ctx):
+ return ctx.author.id in ctx.bot.config[str(ctx.message.guild.id)]["bot_masters"]
+
@commands.command(aliases=['deleteEverything'], hidden=True)
async def purge(self, ctx):
if ctx.author.id in self.bot.config[str(ctx.message.guild.id)]["bot_masters"]:
@@ -160,11 +163,11 @@ class Admin(commands.Cog):
await ctx.send("{0.mention} has been unmuted by {1.mention}".format(i, ctx.author))
@commands.command()
+ @commands.check(is_botmaster)
async def logs(self, ctx, *):
- if ctx.author.id in self.bot.config[str(ctx.message.guild.id)]["bot_master"]:
- await ctx.message.delete()
- file = discord.File("discord.log")
- await ctx.send(file=file)
+ await ctx.message.delete()
+ file = discord.File("discord.log")
+ await ctx.send(file=file)
@commands.command(aliases=['ban'], hidden=True)
@commands.check(is_mod)