From 7f345f194f91cb4551cef9e07b2e3d9d92b64c13 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Fri, 19 May 2023 09:43:51 -0400 Subject: [PATCH] Allow Interaction webhook URLs to be used in Webhook.from_url --- discord/webhook/async_.py | 2 +- discord/webhook/sync.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/discord/webhook/async_.py b/discord/webhook/async_.py index 8a89bff80..dcce6116a 100644 --- a/discord/webhook/async_.py +++ b/discord/webhook/async_.py @@ -1063,7 +1063,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[0-9]{17,20})/(?P[A-Za-z0-9\.\-\_]{60,68})', url) + m = re.search(r'discord(?:app)?\.com/api/webhooks/(?P[0-9]{17,20})/(?P[A-Za-z0-9\.\-\_]{60,})', url) if m is None: raise ValueError('Invalid webhook URL given') diff --git a/discord/webhook/sync.py b/discord/webhook/sync.py index 398342761..670b56665 100644 --- a/discord/webhook/sync.py +++ b/discord/webhook/sync.py @@ -681,7 +681,7 @@ class SyncWebhook(BaseWebhook): A partial :class:`SyncWebhook`. A partial :class:`SyncWebhook` is just a :class:`SyncWebhook` object with an ID and a token. """ - m = re.search(r'discord(?:app)?\.com/api/webhooks/(?P[0-9]{17,20})/(?P[A-Za-z0-9\.\-\_]{60,68})', url) + m = re.search(r'discord(?:app)?\.com/api/webhooks/(?P[0-9]{17,20})/(?P[A-Za-z0-9\.\-\_]{60,})', url) if m is None: raise ValueError('Invalid webhook URL given')