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
|
"""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))
|
||||||
|
|
Loading…
Reference in a new issue