Add webhook.url
This commit is contained in:
parent
025136076a
commit
415ca9a774
@ -359,6 +359,11 @@ class Webhook:
|
|||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return '<Webhook id=%r>' % self.id
|
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
|
@classmethod
|
||||||
def partial(cls, id, token, *, adapter):
|
def partial(cls, id, token, *, adapter):
|
||||||
"""Creates a partial :class:`Webhook`.
|
"""Creates a partial :class:`Webhook`.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user