aboutsummaryrefslogtreecommitdiff
path: root/discord/webhook.py
diff options
context:
space:
mode:
authorRapptz <[email protected]>2020-05-23 21:44:30 -0400
committerRapptz <[email protected]>2020-05-23 21:44:30 -0400
commit66c6be50d8ac5d401a658c757c5f1ccb454c798b (patch)
treebc5079ddfca32f952417416f473283cda045017b /discord/webhook.py
parentplayer: Close ffmpeg stdin during streaming (diff)
downloaddiscord.py-66c6be50d8ac5d401a658c757c5f1ccb454c798b.tar.xz
discord.py-66c6be50d8ac5d401a658c757c5f1ccb454c798b.zip
Prepare for the discord.com domain rename
Diffstat (limited to 'discord/webhook.py')
-rw-r--r--discord/webhook.py6
1 files changed, 3 insertions, 3 deletions
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<id>[0-9]{17,21})/(?P<token>[A-Za-z0-9\.\-\_]{60,68})', url)
+ m = re.search(r'discord(?:app)?.com/api/webhooks/(?P<id>[0-9]{17,21})/(?P<token>[A-Za-z0-9\.\-\_]{60,68})', url)
if m is None:
raise InvalidArgument('Invalid webhook URL given.')
data = m.groupdict()