aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorapple502j <[email protected]>2020-06-05 12:41:40 +0900
committerGitHub <[email protected]>2020-06-04 23:41:40 -0400
commit1ee23a235eecfe88e45218c6df931530970dc562 (patch)
tree116f044e754c7cfbc0388604d3ddea8836f1c2ed
parentFix minor markdown typo in migrating.rst (diff)
downloaddiscord.py-1ee23a235eecfe88e45218c6df931530970dc562.tar.xz
discord.py-1ee23a235eecfe88e45218c6df931530970dc562.zip
Support discord.com/invite URL in resolve_invite
-rw-r--r--discord/utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/discord/utils.py b/discord/utils.py
index 8342d59e..e32ee7fd 100644
--- a/discord/utils.py
+++ b/discord/utils.py
@@ -431,7 +431,7 @@ def resolve_invite(invite):
if isinstance(invite, (Invite, Object)):
return invite.id
else:
- rx = r'(?:https?\:\/\/)?discord(?:\.gg|app\.com\/invite)\/(.+)'
+ rx = r'(?:https?\:\/\/)?discord(?:\.gg|(?:app)?\.com\/invite)\/(.+)'
m = re.match(rx, invite)
if m:
return m.group(1)