From e7d308544526d8e36bea99e819f95a81b1b3ce09 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Tue, 22 Aug 2017 17:52:10 -0400 Subject: [PATCH] Webhook URLs can have dashes and underscores. --- discord/webhook.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discord/webhook.py b/discord/webhook.py index e1b62c211..811b0b608 100644 --- a/discord/webhook.py +++ b/discord/webhook.py @@ -406,7 +406,7 @@ class Webhook: The URL is invalid. """ - m = re.search(r'discordapp.com/api/webhooks/(?P[0-9]{17,21})/(?P[A-Za-z0-9\.]{60,68})', url) + m = re.search(r'discordapp.com/api/webhooks/(?P[0-9]{17,21})/(?P[A-Za-z0-9\.\-\_]{60,68})', url) if m is None: raise InvalidArgument('Invalid webhook URL given.') return cls(m.groupdict(), adapter=adapter)