correction sleep to asyncio

This commit is contained in:
BFlow 2020-04-20 16:42:37 +02:00
parent d89024d32f
commit 36f514b856

View file

@ -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))