mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-20 16:00:29 +00:00
Support discord.com/invite URL in resolve_invite
This commit is contained in:
parent
f2fa613057
commit
1ee23a235e
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user