MaJ
This commit is contained in:
parent
dd861daddd
commit
234ffdf34d
1 changed files with 15 additions and 2 deletions
17
ecoplus.py
17
ecoplus.py
|
@ -39,6 +39,18 @@ guilds = []
|
||||||
|
|
||||||
globals()["gmembers"] = {}
|
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):
|
async def pinguncon(message):
|
||||||
#fcalva's server
|
#fcalva's server
|
||||||
if message.guild.id == 750665878072328242:
|
if message.guild.id == 750665878072328242:
|
||||||
|
@ -130,7 +142,7 @@ async def balance(message):
|
||||||
|
|
||||||
async def collect(message):
|
async def collect(message):
|
||||||
collect_gain = 50
|
collect_gain = 50
|
||||||
cooldown = 10
|
cooldown = 10*60
|
||||||
curr_time = int(time.time())
|
curr_time = int(time.time())
|
||||||
usrid = int(message.author.id)
|
usrid = int(message.author.id)
|
||||||
gid = int(message.guild.id)
|
gid = int(message.guild.id)
|
||||||
|
@ -141,7 +153,7 @@ async def collect(message):
|
||||||
await message.channel.send(init_perso_str)
|
await message.channel.send(init_perso_str)
|
||||||
return
|
return
|
||||||
if lst_coll >= curr_time - cooldown:
|
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")
|
await message.channel.send(f"Vous pourrez toucher votre RSA dans {rtime} minutes")
|
||||||
return
|
return
|
||||||
cash = None
|
cash = None
|
||||||
|
@ -307,6 +319,7 @@ cmd_dict = {\
|
||||||
"?lb":leaderboard,\
|
"?lb":leaderboard,\
|
||||||
"?reload":reload,\
|
"?reload":reload,\
|
||||||
"?slot":slot,\
|
"?slot":slot,\
|
||||||
|
"?roll":roll,\
|
||||||
}
|
}
|
||||||
|
|
||||||
@client.event
|
@client.event
|
||||||
|
|
Loading…
Add table
Reference in a new issue