Skip to content

Commit

Permalink
Edit Challonge URL regex
Browse files Browse the repository at this point in the history
Don't catch URL parameters
  • Loading branch information
laggron42 committed Apr 13, 2021
1 parent 9ec2a2a commit 6779839
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion tournaments/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
log = logging.getLogger("red.laggron.tournaments")
_ = Translator("Tournaments", __file__)

CHALLONGE_URL_RE = re.compile(r"(?:https?://challonge\.com/)(\S{1,2}/)?(?P<id>\S[^/]+)(/.*)?")
CHALLONGE_URL_RE = re.compile(
r"(?:https?://challonge\.com/)(\S{1,2}/)?(?P<id>\S[^/?]+)(/.[^?]*)?(\?.*)?"
)


class ChallongeURLConverter(commands.Converter):
Expand Down
2 changes: 1 addition & 1 deletion tournaments/tournaments.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def __init__(self, bot: Red):
except Exception as e:
log.error("Couldn't load dev env values.", exc_info=e)

__version__ = "1.1.1"
__version__ = "1.1.2"
__author__ = ["retke (El Laggron)", "Wonderfall", "Xyleff"]

@commands.command(hidden=True)
Expand Down

0 comments on commit 6779839

Please sign in to comment.