diff options
| author | 2020-07-29 20:15:48 +0200 | |
|---|---|---|
| committer | 2020-07-29 20:15:48 +0200 | |
| commit | 13a5f35273da39aafdcda7b257364a7756b028ff (patch) | |
| tree | 24005c4be51c59bb0cd004bba285c8dfc07fa94e | |
| parent | word_watchlist -> filter_token in filtering.py. (diff) | |
We search for an invite instead of matching one.
This means we can validate invites that start with https://, whereas
before we could not.
| -rw-r--r-- | bot/converters.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/converters.py b/bot/converters.py index 77d0bead7..5912e3e61 100644 --- a/bot/converters.py +++ b/bot/converters.py @@ -57,7 +57,7 @@ class ValidDiscordServerInvite(Converter): async def convert(self, ctx: Context, server_invite: str) -> dict: """Check whether the string is a valid Discord server invite.""" - invite_code = INVITE_RE.match(server_invite) + invite_code = INVITE_RE.search(server_invite) if invite_code: response = await ctx.bot.http_session.get( f"{URLs.discord_invite_api}/{invite_code[1]}" |