aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Law <[email protected]>2021-05-12 03:38:26 -0700
committerGitHub <[email protected]>2021-05-12 06:38:26 -0400
commit124c4a3919e5361eeb70bd9e34cdac0823bf8499 (patch)
treeaf4d417fb0ee45dc365bc80accdad94d3d7dc5c1
parent[tasks] Type hint the tasks extension (diff)
downloaddiscord.py-124c4a3919e5361eeb70bd9e34cdac0823bf8499.tar.xz
discord.py-124c4a3919e5361eeb70bd9e34cdac0823bf8499.zip
Add Template.url
-rw-r--r--discord/template.py8
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}'