diff options
| author | Sebastian Law <[email protected]> | 2021-05-12 03:38:26 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-05-12 06:38:26 -0400 |
| commit | 124c4a3919e5361eeb70bd9e34cdac0823bf8499 (patch) | |
| tree | af4d417fb0ee45dc365bc80accdad94d3d7dc5c1 | |
| parent | [tasks] Type hint the tasks extension (diff) | |
| download | discord.py-124c4a3919e5361eeb70bd9e34cdac0823bf8499.tar.xz discord.py-124c4a3919e5361eeb70bd9e34cdac0823bf8499.zip | |
Add Template.url
| -rw-r--r-- | discord/template.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/discord/template.py b/discord/template.py index fd4554d7..2eaa6927 100644 --- a/discord/template.py +++ b/discord/template.py @@ -283,3 +283,11 @@ class Template: This template does not exist. """ await self._state.http.delete_template(self.source_guild.id, self.code) + + @property + def url(self) -> str: + """:class:`str`: The template url. + + .. versionadded:: 2.0 + """ + return f'https://discord.new/{self.code}' |