duels.py 文件源码

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

项目:ridings-cogs 作者: ridinginstyle00 项目源码 文件源码
def _stats(self, ctx, user : discord.Member=None):
        """Show rank and XP of users.

        Defaults to yours."""
        if not user:
            user = ctx.message.author 
            if self.check_joined(user.id):
                await self.bot.say("{}'s stats: **Wins: {} | Losses: {} | Ties: {} **".format(user.name, self.get_wins(user.id),
                                                                         self.get_losses(user.id),
                                                                         self.get_ties(user.id)))
            else:
                await self.bot.say("{}, you are not yet in the tournament!".format(user.mention))
        else:
            if self.check_joined(user.id):
                await self.bot.say("{}'s stats: **Wins: {} | Losses: {} | Ties: {} **".format(user.name, self.get_wins(user.id),
                                                                         self.get_losses(user.id),
                                                                         self.get_ties(user.id)))
            else:
                await self.bot.say("This user has not joined the tournament")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号