def _ignore(self, context, channel: discord.Channel):
"""[channel]"""
data = dataIO.load_json(self.ignore_file)
current_server = context.message.server.id
current_channel = channel.id
if current_server not in data:
data[current_server] = []
if current_channel not in data[current_server]:
data[current_server].append(current_channel)
message = 'Ignoring {}'.format(channel.mention)
else:
data[current_server].remove(current_channel)
message = 'Unignoring {}'.format(channel.mention)
dataIO.save_json(self.ignore_file, data)
await self.bot.say('*{}*'.format(message))
评论列表
文章目录