aboutsummaryrefslogtreecommitdiff
path: root/discord/invite.py
diff options
context:
space:
mode:
authorDevon R <[email protected]>2019-11-14 21:37:23 +0000
committerRapptz <[email protected]>2019-11-15 04:25:38 -0500
commitf5ebf42e1f2c4e9d3ffe1a9edd59a659ff483c53 (patch)
treeb0df1fc8f2e5780048add68ea03905f66cf58327 /discord/invite.py
parentAdd view_guild_insights permission (diff)
downloaddiscord.py-f5ebf42e1f2c4e9d3ffe1a9edd59a659ff483c53.tar.xz
discord.py-f5ebf42e1f2c4e9d3ffe1a9edd59a659ff483c53.zip
Return invites as https, various URL normalization
Diffstat (limited to 'discord/invite.py')
-rw-r--r--discord/invite.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/discord/invite.py b/discord/invite.py
index d91d06e6..f4c8e1f2 100644
--- a/discord/invite.py
+++ b/discord/invite.py
@@ -256,6 +256,8 @@ class Invite(Hashable):
'temporary', 'max_uses', 'inviter', 'channel', '_state',
'approximate_member_count', 'approximate_presence_count' )
+ BASE = 'https://discord.gg/'
+
def __init__(self, *, state, data):
self._state = state
self.max_age = data.get('max_age')
@@ -309,7 +311,7 @@ class Invite(Hashable):
@property
def url(self):
""":class:`str`: A property that retrieves the invite URL."""
- return 'http://discord.gg/' + self.code
+ return self.BASE + self.code
async def delete(self, *, reason=None):
"""|coro|