Xp.py 文件源码

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

项目:CorpBot.py 作者: corpnewt 项目源码 文件源码
def recheckrole(self, ctx, *, user : discord.Member = None):
        """Re-iterate through all members and assign the proper roles based on their xp (admin only)."""

        author  = ctx.message.author
        server  = ctx.message.server
        channel = ctx.message.channel

        isAdmin = author.permissions_in(channel).administrator

        # Only allow admins to change server stats
        if not isAdmin:
            await self.bot.send_message(channel, 'You do not have sufficient privileges to access this command.')
            return

        if not user:
            user = author

        # Now we check for promotions
        if await CheckRoles.checkroles(user, channel, self.settings, self.bot):
            await self.bot.send_message(channel, 'Done checking roles.\n\n*{}* was updated.'.format(DisplayName.name(user)))
        else:
            await self.bot.send_message(channel, 'Done checking roles.\n\n*{}* was not updated.'.format(DisplayName.name(user)))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号