Return invites as https, various URL normalization
This commit is contained in:
@ -586,7 +586,7 @@ class Webhook:
|
||||
"""
|
||||
if self.avatar is None:
|
||||
# Default is always blurple apparently
|
||||
return Asset(self._state, 'https://cdn.discordapp.com/embed/avatars/0.png')
|
||||
return Asset(self._state, 'embed/avatars/0.png')
|
||||
|
||||
if not utils.valid_icon_size(size):
|
||||
raise InvalidArgument("size must be a power of 2 between 16 and 1024")
|
||||
@ -596,7 +596,7 @@ class Webhook:
|
||||
if format not in ('png', 'jpg', 'jpeg'):
|
||||
raise InvalidArgument("format must be one of 'png', 'jpg', or 'jpeg'.")
|
||||
|
||||
url = 'https://cdn.discordapp.com/avatars/{0.id}/{0.avatar}.{1}?size={2}'.format(self, format, size)
|
||||
url = 'avatars/{0.id}/{0.avatar}.{1}?size={2}'.format(self, format, size)
|
||||
return Asset(self._state, url)
|
||||
|
||||
def delete(self):
|
||||
|
Reference in New Issue
Block a user