From 234ffdf34dd00ccb98a72b34a81ebe2266c1b3f9 Mon Sep 17 00:00:00 2001 From: attilavs2 Date: Wed, 7 May 2025 10:08:15 +0200 Subject: [PATCH] MaJ --- ecoplus.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/ecoplus.py b/ecoplus.py index f02d2b6..2c1d2aa 100644 --- a/ecoplus.py +++ b/ecoplus.py @@ -39,6 +39,18 @@ guilds = [] globals()["gmembers"] = {} +async def roll(message): + spec = message.content.split(" ")[1].split("d") + roll = "" + print(spec) + if len(spec) > 1: + d = int(spec[1]) + for i in range(int(spec[0])): + roll += str(random.randint(1,d)) + " " + else: + roll += str(random.randint(1,int(spec[0]))) + await message.channel.send(roll) + async def pinguncon(message): #fcalva's server if message.guild.id == 750665878072328242: @@ -130,7 +142,7 @@ async def balance(message): async def collect(message): collect_gain = 50 - cooldown = 10 + cooldown = 10*60 curr_time = int(time.time()) usrid = int(message.author.id) gid = int(message.guild.id) @@ -141,7 +153,7 @@ async def collect(message): await message.channel.send(init_perso_str) return if lst_coll >= curr_time - cooldown: - rtime = (-curr_time + cooldown + lst_coll) + rtime = (-curr_time + cooldown + lst_coll)//60 await message.channel.send(f"Vous pourrez toucher votre RSA dans {rtime} minutes") return cash = None @@ -307,6 +319,7 @@ cmd_dict = {\ "?lb":leaderboard,\ "?reload":reload,\ "?slot":slot,\ + "?roll":roll,\ } @client.event