From 36f514b8563154b315fae45e134fd642ca002f80 Mon Sep 17 00:00:00 2001 From: BFlow Date: Mon, 20 Apr 2020 16:42:37 +0200 Subject: [PATCH] correction sleep to asyncio --- kabot/kabot/kabot.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kabot/kabot/kabot.py b/kabot/kabot/kabot.py index 0d9aa5a..9ac9ef2 100644 --- a/kabot/kabot/kabot.py +++ b/kabot/kabot/kabot.py @@ -11,7 +11,6 @@ import giphy_client import gitlab import lxml -from time import sleep from discord.ext import tasks, commands from subprocess import * from sys import argv @@ -30,7 +29,7 @@ class Mybot(commands.Cog): async def join(self, ctx): channel = [x for x in self.bot.get_all_channels() if x.name == "Général"][0] await channel.connect() - sleep(2) + await asyncio.sleep(2) @commands.command() async def disconnect(self, ctx): @@ -452,7 +451,7 @@ def main(): ctx = await bot.get_context(current_chan.last_message) ctx.message.author = member welcome = bot.get_command('welcome') - sleep(2) + await asyncio.sleep(2) await welcome.invoke(ctx) bot.add_cog(Mybot(bot))