punish.py 文件源码

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

项目:refactored-cogs 作者: Kowlin 项目源码 文件源码
def new_channel(self, c):
        if 'Punished' in [r.name for r in c.server.roles]:
            if c.type.name == 'text':
                perms = discord.PermissionOverwrite()
                perms.send_messages = False
                r = discord.utils.get(c.server.roles, name='Punished')
                await self.bot.edit_channel_permissions(c, r, perms)
                log.debug('Punished role created on channel: {}'.format(c.id))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号