mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-11-14 18:11:23 +01:00
Actually bail if length of emojis is 0
This commit is contained in:
parent
0f60152e63
commit
6392e4d9bf
@ -181,7 +181,7 @@ class Titan(discord.AutoShardedClient):
|
|||||||
await self.redisqueue.update_guild(guild)
|
await self.redisqueue.update_guild(guild)
|
||||||
if len(after) == 0:
|
if len(after) == 0:
|
||||||
await self.socketio.on_guild_emojis_update(before)
|
await self.socketio.on_guild_emojis_update(before)
|
||||||
elif len(before) == 0:
|
else:
|
||||||
await self.socketio.on_guild_emojis_update(after)
|
await self.socketio.on_guild_emojis_update(after)
|
||||||
|
|
||||||
async def on_webhooks_update(self, channel):
|
async def on_webhooks_update(self, channel):
|
||||||
|
@ -50,6 +50,8 @@ class SocketIOInterface:
|
|||||||
await self.io.emit('GUILD_MEMBER_UPDATE', data=user, room=str("GUILD_"+str(member.guild.id)), namespace='/gateway')
|
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):
|
async def on_guild_emojis_update(self, emojis):
|
||||||
|
if len(emojis) == 0:
|
||||||
|
return
|
||||||
emotes = get_formatted_emojis(emojis)
|
emotes = get_formatted_emojis(emojis)
|
||||||
await self.io.emit('GUILD_EMOJIS_UPDATE', data=emotes, room=str("GUILD_"+str(emojis[0].guild.id)), namespace='/gateway')
|
await self.io.emit('GUILD_EMOJIS_UPDATE', data=emotes, room=str("GUILD_"+str(emojis[0].guild.id)), namespace='/gateway')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user