From fdf98224b10f2968aca3c7bf96bd012ada50dba5 Mon Sep 17 00:00:00 2001 From: phixxy Date: Fri, 19 Jan 2024 18:51:12 -0800 Subject: [PATCH] plugins now load after sparkys startup process --- sparkytron3000.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sparkytron3000.py b/sparkytron3000.py index 1db391e..c5094f5 100644 --- a/sparkytron3000.py +++ b/sparkytron3000.py @@ -270,6 +270,9 @@ async def on_disconnect(): @bot.event async def on_ready(): + folders_made = await folder_setup() + await delete_all_files("tmp/", folders_made) + # Import plugins from plugins folder for plugin_file in os.listdir('plugins/'): if plugin_file != '__init__.py' and plugin_file[-3:] == '.py': @@ -280,9 +283,7 @@ async def on_ready(): await bot.load_extension(f'plugins.{plugin_file[:-3]}') print('We have logged in as {0.user}'.format(bot)) - #stuff to do if first run - folders_made = await folder_setup() - await delete_all_files("tmp/", folders_made) + task_loop.start()