randomise slap and kaamelott commandes
This commit is contained in:
parent
2f5461f01f
commit
d302775b13
1 changed files with 6 additions and 4 deletions
|
@ -159,15 +159,17 @@ def main():
|
|||
|
||||
@aiocron.crontab('50 9-23/1 * * *')
|
||||
async def kron():
|
||||
if random.choice([True,True,True]):
|
||||
kron_choice = random.choice(["kaamelott","slap","kaamelott",False])
|
||||
if kron_choice:
|
||||
sleep(random.choice(range(3550)))
|
||||
for channel in bot.get_all_channels():
|
||||
if channel.name == "général":
|
||||
current_chan = channel
|
||||
ctx = await bot.get_context(current_chan.last_message)
|
||||
ctx.message.content = ""
|
||||
print(ctx.message.content)
|
||||
kaamelott = bot.get_command('kaamelott')
|
||||
await kaamelott.invoke(ctx)
|
||||
random_cmd = bot.get_command(kron_choice)
|
||||
await random_cmd.invoke(ctx)
|
||||
|
||||
@aiocron.crontab('*/5 * * * *')
|
||||
async def pipelette():
|
||||
|
@ -178,7 +180,7 @@ def main():
|
|||
for channel in bot.get_all_channels():
|
||||
if channel.name == "général":
|
||||
current_chan = channel
|
||||
#sleep(random.choice(range(350)))
|
||||
sleep(random.choice(range(350)))
|
||||
ctx = await bot.get_context(current_chan.last_message)
|
||||
ctx.message.content = ""
|
||||
joke = bot.get_command('joke')
|
||||
|
|
Loading…
Reference in a new issue