diff --git a/main.py b/main.py index 30fa363e..0dff6c1a 100644 --- a/main.py +++ b/main.py @@ -921,6 +921,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() + @slash.slash( name="rank", description="Shows your rank or another user's rank",