1
0
Fork 0
mirror of synced 2024-06-02 18:54:33 +12:00

Fixed syntax error

This commit is contained in:
Phxntxm 2016-07-17 11:11:02 -05:00
parent 1eafbb223d
commit 233364f322

View file

@ -168,9 +168,9 @@ class Core:
await self.bot.say("Please provide the format for the tag in: !tag add <tag> - <result>")
return
tags = config.getContent('tags')
for tag in tags:
if tag['tag'] == tag and tag['server_id'] == ctx.message.server.id:
tag['result'] = tag_result
for t in tags:
if t['tag'] == tag and t['server_id'] == ctx.message.server.id:
t['result'] = tag_result
config.saveContent('tags',tags)
return
tags.append({'server_id':ctx.message.server.id,'tag':tag,'result':tag_result})
@ -184,7 +184,7 @@ class Core:
Format to delete a tag is !tag delete <tag>"""
tag = ' '.join(tag).strip()
tags = config.getContent('tags')
result = [tag for tag in tags if tag['tag'] == tag and tag['server_id'] == ctx.message.server.id]
result = [t for t in tags if t['tag'] == tag and t['server_id'] == ctx.message.server.id]
if len(result) == 0:
await self.bot.say("The tag {} does not exist! You can't remove something if it doesn't exist...".format(tag))
return