Sebastian Winkler
8 years ago
No known key found for this signature in database
GPG Key ID: 6E5F12DD21107C1D
1 changed files with
2 additions and
6 deletions
-
disco/types/guild.py
|
|
@ -66,9 +66,7 @@ class GuildEmoji(Emoji): |
|
|
|
animated = Field(bool) |
|
|
|
|
|
|
|
def __str__(self): |
|
|
|
if self.animated: |
|
|
|
return u'<a:{}:{}>'.format(self.name, self.id) |
|
|
|
return u'<:{}:{}>'.format(self.name, self.id) |
|
|
|
return u'<{}:{}:{}>'.format('a' if self.animated else '', self.name, self.id) |
|
|
|
|
|
|
|
def update(self, **kwargs): |
|
|
|
return self.client.api.guilds_emojis_modify(self.guild_id, self.id, **kwargs) |
|
|
@ -78,9 +76,7 @@ class GuildEmoji(Emoji): |
|
|
|
|
|
|
|
@property |
|
|
|
def url(self): |
|
|
|
if self.animated: |
|
|
|
return 'https://discordapp.com/api/emojis/{}.gif'.format(self.id) |
|
|
|
return 'https://discordapp.com/api/emojis/{}.png'.format(self.id) |
|
|
|
return 'https://discordapp.com/api/emojis/{}.{}'.format(self.id, 'gif' if self.animated else 'png') |
|
|
|
|
|
|
|
@cached_property |
|
|
|
def guild(self): |
|
|
|