Exemple #1
0
 async def on_channel_delete(self, channel):
     if str(channel.type) != "text":
         return
     chan = get_formatted_channel(channel)
     await self.io.emit('CHANNEL_DELETE',
                        data=chan,
                        room=str("GUILD_" + str(channel.guild.id)),
                        namespace='/gateway')
Exemple #2
0
 async def on_channel_update(self, channel):
     if not isinstance(channel,
                       discord.channel.TextChannel) and not isinstance(
                           channel, discord.channel.CategoryChannel):
         return
     chan = get_formatted_channel(channel)
     await self.io.emit('CHANNEL_UPDATE',
                        data=chan,
                        room=str("GUILD_" + str(channel.guild.id)),
                        namespace='/gateway')