[commads] Change cog/extension load/unload methods to be async

This commit is contained in:
Josh
2022-03-14 11:03:45 +10:00
committed by GitHub
parent a339e01047
commit a1c618215e
8 changed files with 210 additions and 50 deletions

View File

@ -137,5 +137,9 @@ async def on_ready():
print(f'Logged in as {bot.user} (ID: {bot.user.id})')
print('------')
bot.add_cog(Music(bot))
bot.run('token')
async def main():
async with bot:
await bot.add_cog(Music(bot))
await bot.start('token')
asyncio.run(main())