Пример #1
0
    async def reset(self, ctx, *, user=None):

        user = getuser(ctx, user)

        blutapi.setpoints(user, 0)

        await ctx.send(f"Successfuly reset {user}")
Пример #2
0
    async def gift(self, ctx, ammount, *, user=None):

        user = getuser(ctx, user)

        ammount = int(ammount)

        gifterpoints = int(blutapi.getpoints(ctx.author))
        recepoints = int(blutapi.getpoints(user))

        if user == ctx.author:
            return await ctx.send("You cant gift yourself points")

        if gifterpoints < ammount:
            return await ctx.send("You dont have enough points to gift that.")

        if ammount == 0:
            return await ctx.send("You cant gift 0 points")

        if ammount < 0:
            return await ctx.send("You Cant gift - points nub")

        gnewpoints = gifterpoints - int(ammount)
        rnewpoints = recepoints + ammount

        try:
            blutapi.setpoints(ctx.author, gnewpoints)
            blutapi.setpoints(user, rnewpoints)
            await ctx.send("Transaction Sucessful!")
        except Exception as err:
            await ctx.send(f"Transaction failed : {err}")
Пример #3
0
    async def setpoints(Self, ctx, ammount, *, user=None):

        user = getuser(ctx, user)

        ammount = int(ammount)
        blutapi.setpoints(user, ammount)
        await ctx.send(f"successfully set {user} to {ammount} points")
Пример #4
0
    async def gamble(self, ctx, ammount):

        user = ctx.author
        startingpoints = int(blutapi.getpoints(user))
        chance = randrange(0, 2)
        ammount = ammount.lower()

        if ammount == "all":
            ammount = startingpoints

        if ammount == "half":
            ammount = startingpoints / 2

        if ammount == "quart":
            ammount = startingpoints / 4

        if ammount == "eighth":
            ammount = startingpoints / 8

        ammount = int(ammount)

        if ammount == 0:
            return await ctx.send("You cant gamble 0 points")

        if ammount > startingpoints:
            return await ctx.send("You cant gamble more than you have!")

        if ammount < 0:
            return await ctx.send("You cant gamble - points nub")

        if chance:
            newpoints = ammount + startingpoints

            if ammount == startingpoints:
                await ctx.send(
                    f"You went all in and WON! You now have `{newpoints}` points"
                )
            else:
                await ctx.send(
                    f"You gambled `{ammount}` and WON! You now have `{newpoints}` points"
                )

        else:
            newpoints = startingpoints - ammount

            if ammount == startingpoints:
                await ctx.send(
                    f"You went all in and lost everything LMAO. You now have `{newpoints}` points"
                )
            else:
                await ctx.send(
                    f"You gambled `{ammount}` And lost it all lol. You now have `{newpoints}` points"
                )

        blutapi.setpoints(user, newpoints)
Пример #5
0
    async def daily(self, ctx):

        isClaimed = blutapi.getclaimed(ctx.author)

        print(isClaimed[0])

        if not isClaimed[0]:

            now = datetime.datetime.now()
            nextclaimDelta = relativedelta(now, isClaimed[1])

            nextclaim = f"You can claim your points again in **{abs(nextclaimDelta.hours)} hours, {abs(nextclaimDelta.minutes)} minutes, {abs(nextclaimDelta.seconds)} seconds.**"

            await ctx.send(nextclaim)

        else:

            points = int(blutapi.getpoints(ctx.author))
            points = points + 100

            blutapi.setpoints(ctx.author, points)

            await ctx.send('You have claimed your daily **100 points**')