Browse Source

Fix API-returned GuildEmoji's not having guild_id set

pull/27/head
Andrei 8 years ago
parent
commit
7256ff35fc
  1. 4
      disco/api/client.py

4
disco/api/client.py

@ -324,11 +324,11 @@ class APIClient(LoggingClass):
def guilds_emojis_create(self, guild, **kwargs): def guilds_emojis_create(self, guild, **kwargs):
r = self.http(Routes.GUILDS_EMOJIS_CREATE, dict(guild=guild), json=kwargs) r = self.http(Routes.GUILDS_EMOJIS_CREATE, dict(guild=guild), json=kwargs)
return GuildEmoji.create(self.client, r.json()) return GuildEmoji.create(self.client, r.json(), guild_id=guild)
def guilds_emojis_modify(self, guild, emoji, **kwargs): def guilds_emojis_modify(self, guild, emoji, **kwargs):
r = self.http(Routes.GUILDS_EMOJIS_MODIFY, dict(guild=guild, emoji=emoji), json=kwargs) r = self.http(Routes.GUILDS_EMOJIS_MODIFY, dict(guild=guild, emoji=emoji), json=kwargs)
return GuildEmoji.create(self.client, r.json()) return GuildEmoji.create(self.client, r.json(), guild_id=guild)
def guilds_emojis_delete(self, guild, emoji): def guilds_emojis_delete(self, guild, emoji):
self.http(Routes.GUILDS_EMOJIS_DELETE, dict(guild=guild, emoji=emoji)) self.http(Routes.GUILDS_EMOJIS_DELETE, dict(guild=guild, emoji=emoji))

Loading…
Cancel
Save