1
0
Fork 0
mirror of synced 2024-06-21 12:00:16 +12:00

Imported re for regex use

This commit is contained in:
phxntxm 2016-08-05 17:00:16 -05:00
parent 3deed243ce
commit 796ae55ffd

View file

@ -1,6 +1,7 @@
from discord.ext import commands
from .utils import config
from .utils import checks
import re
class Tags:
@ -35,8 +36,8 @@ class Tags:
"""Use this to add a new tag that can be used in this server
Format to add a tag is !tag add <tag> - <result>"""
try:
tag = re.search("(.*) - (.*)",result).group(1).strip()
tag_result = re.search("(.*) - (.*)",result).group(2).strip()
tag = re.search("(.*) - (.*)", result).group(1).strip()
tag_result = re.search("(.*) - (.*)", result).group(2).strip()
except AttributeError:
await self.bot.say("Please provide the format for the tag in: !tag add <tag> - <result>")
return