Added an error checking in case a tag was provided in the incorrect format
This commit is contained in:
parent
567162268b
commit
ecf36d59c9
1 changed files with 1 additions and 1 deletions
|
@ -36,7 +36,7 @@ class Tags:
|
||||||
Format to add a tag is !tag add <tag> - <result>"""
|
Format to add a tag is !tag add <tag> - <result>"""
|
||||||
try:
|
try:
|
||||||
tag = re.search("(.*) - (.*)",result).group(1).strip()
|
tag = re.search("(.*) - (.*)",result).group(1).strip()
|
||||||
tag_result = "(.*) - (.*)",result).group(2).strip()
|
tag_result = re.search("(.*) - (.*)",result).group(2).strip()
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
await self.bot.say("Please provide the format for the tag in: !tag add <tag> - <result>")
|
await self.bot.say("Please provide the format for the tag in: !tag add <tag> - <result>")
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue