diff options
| author | rooni <[email protected]> | 2017-09-18 19:31:20 +0200 |
|---|---|---|
| committer | rooni <[email protected]> | 2017-09-18 19:31:20 +0200 |
| commit | 415ca9a7748f77ffcb1000eca2a703cd856a576a (patch) | |
| tree | de405fde96d1ef260265096714ca65a8772e3c9c | |
| parent | Add an example for on_reaction_add waiting. (diff) | |
| download | discord.py-415ca9a7748f77ffcb1000eca2a703cd856a576a.tar.xz discord.py-415ca9a7748f77ffcb1000eca2a703cd856a576a.zip | |
Add webhook.url
| -rw-r--r-- | discord/webhook.py | 5 |
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`. |