async def xp(self, ctx, user: UserWithCharacter = Author): _( """`[user]` - The player whose XP and level to show; defaults to oneself Show a player's XP and level. You can gain more XP by: - Completing adventures - Exchanging loot items for XP""" ) if user.id == ctx.author.id: points = ctx.character_data["xp"] await ctx.send( _( "You currently have **{points} XP**, which means you are on Level" " **{level}**. Missing to next level: **{missing}**" ).format( points=points, level=rpgtools.xptolevel(points), missing=rpgtools.xptonextlevel(points), ) ) else: points = ctx.user_data["xp"] await ctx.send( _( "{user} has **{points} XP** and is on Level **{level}**. Missing to" " next level: **{missing}**" ).format( user=user, points=points, level=rpgtools.xptolevel(points), missing=rpgtools.xptonextlevel(points), ) )
async def xp(self, ctx, user: UserWithCharacter = Author): _("""Shows current XP and level of a player.""") if user.id == ctx.author.id: points = ctx.character_data["xp"] await ctx.send( _( "You currently have **{points} XP**, which means you are on Level **{level}**. Missing to next level: **{missing}**" ).format( points=points, level=rpgtools.xptolevel(points), missing=rpgtools.xptonextlevel(points), ) ) else: points = ctx.user_data["xp"] await ctx.send( _( "{user} has **{points} XP** and is on Level **{level}**. Missing to next level: **{missing}**" ).format( user=user, points=points, level=rpgtools.xptolevel(points), missing=rpgtools.xptonextlevel(points), ) )
async def xp(self, ctx): _("""Shows your current XP and level.""") points = ctx.character_data["xp"] await ctx.send( _("You currently have **{points} XP**, which means you are on Level **{level}**. Missing to next level: **{missing}**" ).format( points=points, level=rpgtools.xptolevel(points), missing=rpgtools.xptonextlevel(points), ))