Actually bail if length of emojis is 0

This commit is contained in:
Jeremy Zhang
2018-12-30 21:00:41 +00:00
parent 0f60152e63
commit 6392e4d9bf
2 changed files with 3 additions and 1 deletions

View File

@ -50,6 +50,8 @@ class SocketIOInterface:
await self.io.emit('GUILD_MEMBER_UPDATE', data=user, room=str("GUILD_"+str(member.guild.id)), namespace='/gateway')
async def on_guild_emojis_update(self, emojis):
if len(emojis) == 0:
return
emotes = get_formatted_emojis(emojis)
await self.io.emit('GUILD_EMOJIS_UPDATE', data=emotes, room=str("GUILD_"+str(emojis[0].guild.id)), namespace='/gateway')