mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-05-15 18:29:52 +00:00
Fix unescaped period in webhook regex
This commit is contained in:
parent
2d180489ce
commit
3af6b9a1e9
@ -1227,7 +1227,7 @@ class Webhook(BaseWebhook):
|
||||
A partial :class:`Webhook`.
|
||||
A partial webhook is just a webhook object with an ID and a token.
|
||||
"""
|
||||
m = re.search(r'discord(?:app)?.com/api/webhooks/(?P<id>[0-9]{17,20})/(?P<token>[A-Za-z0-9\.\-\_]{60,68})', url)
|
||||
m = re.search(r'discord(?:app)?\.com/api/webhooks/(?P<id>[0-9]{17,20})/(?P<token>[A-Za-z0-9\.\-\_]{60,68})', url)
|
||||
if m is None:
|
||||
raise ValueError('Invalid webhook URL given.')
|
||||
|
||||
|
@ -683,7 +683,7 @@ class SyncWebhook(BaseWebhook):
|
||||
A partial :class:`Webhook`.
|
||||
A partial webhook is just a webhook object with an ID and a token.
|
||||
"""
|
||||
m = re.search(r'discord(?:app)?.com/api/webhooks/(?P<id>[0-9]{17,20})/(?P<token>[A-Za-z0-9\.\-\_]{60,68})', url)
|
||||
m = re.search(r'discord(?:app)?\.com/api/webhooks/(?P<id>[0-9]{17,20})/(?P<token>[A-Za-z0-9\.\-\_]{60,68})', url)
|
||||
if m is None:
|
||||
raise ValueError('Invalid webhook URL given.')
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user