diff --git a/ubot/modules/danbooru.py b/ubot/modules/danbooru.py index 4a5324f..843827a 100644 --- a/ubot/modules/danbooru.py +++ b/ubot/modules/danbooru.py @@ -38,6 +38,7 @@ async def danbooru(event): response = await response.json() else: await event.reply(f"`An error occurred, response code: `**{response.status}**") + await session.close() return await session.close() diff --git a/ubot/modules/gelbooru.py b/ubot/modules/gelbooru.py index 1faf5e1..5a3ff30 100644 --- a/ubot/modules/gelbooru.py +++ b/ubot/modules/gelbooru.py @@ -42,6 +42,7 @@ async def gelbooru(event): response = await response.json() else: await event.reply(f"`An error occurred, response code: `**{response.status}**") + await session.close() return await session.close() diff --git a/ubot/modules/urbandict.py b/ubot/modules/urbandict.py index a6baa20..852c986 100644 --- a/ubot/modules/urbandict.py +++ b/ubot/modules/urbandict.py @@ -30,6 +30,7 @@ async def urban_dict(event): response = await response.json() else: await event.reply(f"`An error occurred, response code:` **{response.status}**") + await session.close() return await session.close()