From 66c6be50d8ac5d401a658c757c5f1ccb454c798b Mon Sep 17 00:00:00 2001 From: Rapptz Date: Sat, 23 May 2020 21:44:30 -0400 Subject: Prepare for the discord.com domain rename --- discord/webhook.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'discord/webhook.py') diff --git a/discord/webhook.py b/discord/webhook.py index c4fc9734..a45d27e0 100644 --- a/discord/webhook.py +++ b/discord/webhook.py @@ -53,7 +53,7 @@ class WebhookAdapter: The webhook that owns this adapter. """ - BASE = 'https://discordapp.com/api/v7' + BASE = 'https://discord.com/api/v7' def _prepare(self, webhook): self._webhook_id = webhook.id @@ -454,7 +454,7 @@ class Webhook: @property def url(self): """Returns the webhook's url.""" - return 'https://discordapp.com/api/webhooks/{}/{}'.format(self.id, self.token) + return 'https://discord.com/api/webhooks/{}/{}'.format(self.id, self.token) @classmethod def partial(cls, id, token, *, adapter): @@ -504,7 +504,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'discord(?:app)?.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.') data = m.groupdict() -- cgit v1.2.3