diff options
| author | Devon R <[email protected]> | 2019-11-14 21:37:23 +0000 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2019-11-15 04:25:38 -0500 |
| commit | f5ebf42e1f2c4e9d3ffe1a9edd59a659ff483c53 (patch) | |
| tree | b0df1fc8f2e5780048add68ea03905f66cf58327 /discord/invite.py | |
| parent | Add view_guild_insights permission (diff) | |
| download | discord.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.py | 4 |
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| |