1
0
Fork 0
mirror of synced 2024-09-21 12:02:52 +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 """Use this to add a new tag that can be used in this server
Format to add a tag is !tag add <tag> - <result>""" Format to add a tag is !tag add <tag> - <result>"""
result = ' '.join(result).strip() result = ' '.join(result).strip()
tag = result[0:result.find('-')] tag = result[0:result.find('-')].strip()
result = result[result.find('-') + 2:] 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 = config.getCursor()
cursor.execute('use {}'.format(config.db_default)) cursor.execute('use {}'.format(config.db_default))
cursor.execute('select * from tags where server_id=%s and tag=%s', (ctx.message.server.id, tag)) cursor.execute('select * from tags where server_id=%s and tag=%s', (ctx.message.server.id, tag))