Advertisement
EpicShardGamingYT

Untitled

May 20th, 2018
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 3.15 KB | None | 0 0
  1. @client.command(pass_context=True)
  2. async def rankup(ctx):
  3.     if ctx.message.author.top_role.name.lower() == 'members':
  4.         if DB.xp.getSTATS(ctx.message.author.id)[2] < 50:
  5.             return await client.say("You dont have enough XP to level up!")
  6.         ID_ = ctx.message.author.id
  7.         CX = DB.xp.getSTATS(ID_)[2]
  8.         NX = -50
  9.         SX = NX + CX
  10.         DB.xp.setSTATS(ID_, SX)
  11.         DB.xp.commit()
  12.         embed = discord.Embed(title="Rankup!", description="You just ranked up to Noob! Congratz")
  13.         embed.add_field(name="Cost: ", value="50 XP")
  14.         await client.say(embed=embed)
  15.         role = discord.utils.get(ctx.message.author.server.roles, name="Noob")
  16.         await client.add_roles(ctx.message.author, role)
  17.     elif ctx.message.author.top_role.name.lower() == 'noob':
  18.         if DB.xp.getSTATS(ctx.message.author.id)[2] < 100:
  19.             return await client.say("You dont have enough XP to level up!")
  20.         ID_ = ctx.message.author.id
  21.         CX = DB.xp.getSTATS(ID_)[2]
  22.         NX = -100
  23.         SX = NX + CX
  24.         DB.xp.setSTATS(ID_, SX)
  25.         DB.xp.commit()
  26.         embed = discord.Embed(title="Rankup!", description="You just ranked up to Idiot! Congratz")
  27.         embed.add_field(name="Cost: ", value="100 XP")
  28.         await client.say(embed=embed)
  29.         role = discord.utils.get(ctx.message.author.server.roles, name="Idiot")
  30.         await client.add_roles(ctx.message.author, role)
  31.     elif ctx.message.author.top_role.name.lower() == 'Idiot':
  32.         if DB.xp.getSTATS(ctx.message.author.id)[2] < 400:
  33.             return await client.say("You dont have enough XP to level up!")
  34.         ID_ = ctx.message.author.id
  35.         CX = DB.xp.getSTATS(ID_)[2]
  36.         NX = -400
  37.         SX = NX + CX
  38.         DB.xp.setSTATS(ID_, SX)
  39.         DB.xp.commit()
  40.         embed = discord.Embed(title="Rankup!", description="You just ranked up to Bad-Ass! Congratz")
  41.         embed.add_field(name="Cost: ", value="400 XP")
  42.         await client.say(embed=embed)
  43.         role = discord.utils.get(ctx.message.author.server.roles, name="Bad-ass")
  44.         await client.add_roles(ctx.message.author, role)
  45.     elif ctx.message.author.top_role.name.lower() == 'Bad-ass':
  46.         if DB.xp.getSTATS(ctx.message.author.id)[2] < 1000:
  47.             return await client.say("You dont have enough XP to level up!")
  48.         ID_ = ctx.message.author.id
  49.         CX = DB.xp.getSTATS(ID_)[2]
  50.         NX = -1000
  51.         SX = NX + CX
  52.         DB.xp.setSTATS(ID_, SX)
  53.         DB.xp.commit()
  54.         embed = discord.Embed(title="Rankup!", description="You just ranked up to {}! Congratz")
  55.         embed.add_field(name="Cost: ", value="1000 XP")
  56.         await client.say(embed=embed)
  57.         role = discord.utils.get(ctx.message.author.server.roles, name="IDC")
  58.         await client.add_roles(ctx.message.author, role)
  59.     elif ctx.message.author.top_role.name.lower() == 'IDC':
  60.         if DB.xp.getSTATS(ctx.message.author.id)[2] < 9999:
  61.             return await client.say("You dont have enough XP to level up!")
  62.         ID_ = ctx.message.author.id
  63.         CX = DB.xp.getSTATS(ID_)[2]
  64.         NX = -9999
  65.         SX = NX + CX
  66.         DB.xp.setSTATS(ID_, SX)
  67.         DB.xp.commit()
  68.         embed = discord.Embed(title="Rankup!", description="You just ranked up to {}! Congratz")
  69.         embed.add_field(name="Cost: ", value="9999 XP")
  70.         await client.say(embed=embed)
  71.         role = discord.utils.get(ctx.message.author.server.roles, name="Vip")
  72.         await client.add_roles(ctx.message.author, role)
  73.     else:
  74.         await client.say("You are at the max rank! :sob:")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement