1
0
Fork 0
mirror of synced 2024-09-21 03:51:46 +12:00

Fixed indentation issue in checks

This commit is contained in:
Phxntxm 2016-07-16 13:09:44 -05:00
parent acb9dfe340
commit 0dfa188542
2 changed files with 7 additions and 4 deletions

View file

@ -171,8 +171,11 @@ class Core:
"""Use this to add a new tag that can be used in this server
Format to add a tag is !tag add <tag> - <result>"""
result = ' '.join(result).strip()
tag = result[0:result.find('-')]
result = result[result.find('-') + 2:]
tag = result[0:result.find('-')].strip()
result = result[result.find('-') + 2:].strip()
if len(tag) == 0 or len(result) == 0:
await self.bot.say("Please provide the format for the tag in: !tag add <tag> - <result>")
return
cursor = config.getCursor()
cursor.execute('use {}'.format(config.db_default))
cursor.execute('select * from tags where server_id=%s and tag=%s', (ctx.message.server.id, tag))

View file

@ -24,8 +24,8 @@ def customPermsOrRole(perm):
result = cursor.fetchone()
if result is not None:
perm = result['perms']
if perm == "none":
return True
if perm == "none":
return True
config.closeConnection()
for role in ctx.message.author.roles:
if getattr(role.permissions, perm):