plugins now load after sparkys startup process
This commit is contained in:
parent
44d656c15d
commit
fdf98224b1
1 changed files with 4 additions and 3 deletions
|
|
@ -270,6 +270,9 @@ async def on_disconnect():
|
||||||
|
|
||||||
@bot.event
|
@bot.event
|
||||||
async def on_ready():
|
async def on_ready():
|
||||||
|
folders_made = await folder_setup()
|
||||||
|
await delete_all_files("tmp/", folders_made)
|
||||||
|
|
||||||
# Import plugins from plugins folder
|
# Import plugins from plugins folder
|
||||||
for plugin_file in os.listdir('plugins/'):
|
for plugin_file in os.listdir('plugins/'):
|
||||||
if plugin_file != '__init__.py' and plugin_file[-3:] == '.py':
|
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]}')
|
await bot.load_extension(f'plugins.{plugin_file[:-3]}')
|
||||||
|
|
||||||
print('We have logged in as {0.user}'.format(bot))
|
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()
|
task_loop.start()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue