Exemple #1
0
 async def buy_role(self, ctx, *, role: str):
     roleB = discord.utils.get(ctx.guild.roles, name=role)
     if roleB:
         if roleB in ctx.author.roles:
             await ctx.send("You already own this role!")
         elif db.get_points(ctx.author.id) >= config.shop_dict[role]:
             db.remove_points(ctx.author.id, config.shop_dict[role])
             await ctx.author.add_roles(roleB)
             await ctx.send(
                 f"{ctx.author.mention} has bought the role {str(roleB)}!")
         else:
             await ctx.send(
                 "You do not have enough points to buy this role.")
     else:
         await ctx.send("That role is not in the shop.")
Exemple #2
0
 async def fifty_fifty(self, ctx, bet: int):
     curpts = int(db.get_points(ctx.author.id))
     if bet <= 0:
         await ctx.send("Your bet must be greater than 0.")
     elif curpts >= bet:
         roll = random.randint(1, 2)
         if roll == 2:
             db.add_points(ctx.author.id, bet)
             await ctx.send(
                 f"{ctx.author.mention} is a WINNER! You've earned {bet} Bogan Points!"
             )
         else:
             db.remove_points(ctx.author.id, bet)
             await ctx.send(
                 f"{ctx.author.mention} loses. You lost {bet} Bogan Points..."
             )
     else:
         await ctx.send(
             "You do not have enough Bogan Points to make that bet.")
Exemple #3
0
 async def dice(self, ctx, bet: int):
     curpts = int(db.get_points(ctx.author.id))
     if bet <= 0:
         await ctx.send("Your bet must be greater than 0.")
     elif curpts >= bet:
         roll = random.randint(1, 100)
         if roll > 55:
             winpts = int(bet * 1.1)
             db.add_points(ctx.author.id, winpts)
             await ctx.send(
                 f"{ctx.author.mention} rolled a {roll} and won {winpts} Bogan Points!"
             )
         else:
             db.remove_points(ctx.author.id, bet)
             await ctx.send(
                 f"{ctx.author.mention} rolled a {roll} and lost {bet} Bogan Points..."
             )
     else:
         await ctx.send(
             "You do not have enough Bogan Points to make that bet.")
Exemple #4
0
 async def pick_a_number(self, ctx, range: int, number_picked: int,
                         bet: int):
     curpts = int(db.get_points(ctx.author.id))
     if bet <= 0:
         await ctx.send("Your bet must be greater than 0.")
     elif curpts >= bet:
         roll = random.randint(1, range)
         if roll == number_picked:
             winpts = int(bet * (range * .75))
             db.add_points(ctx.author.id, winpts)
             await ctx.send(
                 f"The number is {roll}! {ctx.author.mention} won {winpts} Bogan Points!"
             )
         else:
             db.remove_points(ctx.author.id, bet)
             await ctx.send(
                 f"The number is {roll}! {ctx.author.mention} lost {bet} Bogan Points..."
             )
     else:
         await ctx.send(
             "You do not have enough Bogan Points to make that bet.")
Exemple #5
0
 async def get_points(self, ctx):
     points = db.get_points(ctx.author.id)
     await ctx.send(f'{ctx.author.mention} has {points} points!')