botadmin.py 文件源码

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

项目:discordbot.py 作者: rauenzi 项目源码 文件源码
def _all(self, ctx):
        """Ignores every channel in the server from being processed.

        This works by adding every channel that the server currently has into
        the ignore list. If more channels are added then they will have to be
        ignored by using the ignore command.

        To use this command you must have Manage Server permissions along with
        Manage Channels permissions. You could also have the Bot Admin role.
        """

        ignored = self.config.get('ignored', [])
        channels = ctx.message.server.channels
        ignored.extend(c.id for c in channels if c.type == discord.ChannelType.text)
        await self.config.put('ignored', list(set(ignored))) # make unique
        await self.bot.responses.success(message='All channels ignored.')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号