Browse Source

Add webhook.url

pull/787/head
rooni 8 years ago
parent
commit
415ca9a774
  1. 5
      discord/webhook.py

5
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`.

Loading…
Cancel
Save