Support discord.com/invite URL in resolve_invite

This commit is contained in:
apple502j 2020-06-05 12:41:40 +09:00 committed by GitHub
parent f2fa613057
commit 1ee23a235e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)