aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--discord/webhook.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/discord/webhook.py b/discord/webhook.py
index 4d88a8d5..4f849877 100644
--- a/discord/webhook.py
+++ b/discord/webhook.py
@@ -359,6 +359,11 @@ class Webhook:
def __repr__(self):
return '<Webhook id=%r>' % self.id
+ @property
+ def url(self):
+ """Returns the webhook's url."""
+ return 'https://discordapp.com/api/webhooks/{}/{}'.format(self.id, self.token)
+
@classmethod
def partial(cls, id, token, *, adapter):
"""Creates a partial :class:`Webhook`.