From 18f2db82622e5c9da105b2ed45a42d17bd80e666 Mon Sep 17 00:00:00 2001 From: snipe_blaze <72265661+notsniped@users.noreply.github.com> Date: Sun, 7 Aug 2022 10:52:01 +0530 Subject: [PATCH] Add `/autogrind` command (aka. pls grind) --- main.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/main.py b/main.py index d6a8d335..ed71e955 100644 --- a/main.py +++ b/main.py @@ -902,6 +902,23 @@ async def afk_mod_remove(ctx:SlashContext, user:discord.User): except KeyError: return await ctx.send("That user isn't AFK.", hidden=True) +@slash.slash( + name="autogrind", + description="Automatically grinds coins and items for you" +) +async def autogrind(ctx:SlashContext): + await ctx.reply("Autogrind has started. Please check back in an hour for your rewards.") + await asyncio.sleep(3600) + coins_reward = random.randint(10000, 35000) + items_reward = [random.choice(shopitem.keys()), random.choice(shopitem.keys()), random.choice(shopitem.keys())] + currency["wallet"][str(ctx.author.id)] += coins_reward + items[str(ctx.author.id)][items_reward[0]] += 1 + items[str(ctx.author.id)][items_reward[1]] += 1 + items[str(ctx.author.id)][items_reward[2]] += 1 + save() + localembed = discord.Embed(title="Autogrind has completed!", description=f"**Your rewards**\n\nYou got **{coins_reward}** coins!\nYou got **1 {items_reward[0]}**!\nYou got **1 {items_reward[1]}**!\nYou got **1 {items_reward[2]}!**", color=discord.Color.greem()) + ctx.author.send() + # Initialization utils.ping.host() client.run(api.auth.get_token())