diff --git a/plugins/soteria_plugin.py b/plugins/soteria_plugin.py index a554cb5..fe3fcea 100644 --- a/plugins/soteria_plugin.py +++ b/plugins/soteria_plugin.py @@ -7,6 +7,10 @@ plugin = plugins.Plugin() sot = soteria.Client(cache=soteria.MemoryCache()) +@plugin.unload_hook() +async def close_sot(): + await sot.close() + @plugin.slash_command(description="gets the 5 most recent BANGERS (posts) from Soteria") async def get_posts(inter: disnake.CommandInteraction): await inter.response.defer() @@ -29,6 +33,5 @@ async def get_posts(inter: disnake.CommandInteraction): embed_list.append(embed) await inter.edit_original_response(embeds=embed_list) - await sot.close() setup, teardown = plugin.create_extension_handlers() \ No newline at end of file