logtools.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:PaddoCogs 作者: PaddoInWonderland 项目源码 文件源码
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))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号