Fixed indentation issue in checks
This commit is contained in:
parent
acb9dfe340
commit
0dfa188542
2 changed files with 7 additions and 4 deletions
|
@ -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))
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue