fix sleep

This commit is contained in:
Milka64 2019-11-18 17:06:56 +01:00
parent 31be129a9e
commit 4d404baedc

View file

@ -166,7 +166,7 @@ def main():
async def kron(): async def kron():
kron_choice = random.choice(["kaamelott","slap","kaamelott",False]) kron_choice = random.choice(["kaamelott","slap","kaamelott",False])
if kron_choice: if kron_choice:
#sleep(random.choice(range(3550))) asyncio.sleep(random.choice(range(3550)))
for channel in bot.get_all_channels(): for channel in bot.get_all_channels():
if channel.name == "général": if channel.name == "général":
current_chan = channel current_chan = channel
@ -185,7 +185,7 @@ def main():
for channel in bot.get_all_channels(): for channel in bot.get_all_channels():
if channel.name == "général": if channel.name == "général":
current_chan = channel current_chan = channel
#sleep(random.choice(range(350))) asyncio.sleep(random.choice(range(350)))
ctx = await bot.get_context(current_chan.last_message) ctx = await bot.get_context(current_chan.last_message)
ctx.message.content = "" ctx.message.content = ""
joke = bot.get_command('joke') joke = bot.get_command('joke')