From 168481f96a08c2705c1b2b0d663b36b7365f817f Mon Sep 17 00:00:00 2001 From: phixxy Date: Sat, 20 Jan 2024 01:53:22 -0800 Subject: [PATCH] removed handle_error --- extensions/phixxycom.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/extensions/phixxycom.py b/extensions/phixxycom.py index 501a095..9f613b0 100644 --- a/extensions/phixxycom.py +++ b/extensions/phixxycom.py @@ -177,15 +177,14 @@ class PhixxyCom(commands.Cog): url = "https://api.openai.com/v1/chat/completions" try: - http_session = aiohttp.ClientSession() - async with http_session.post(url, headers=headers, json=data) as resp: + async with self.bot.http_session.post(url, headers=headers, json=data) as resp: response_data = await resp.json() response = response_data['choices'][0]['message']['content'] - await http_session.close() return response except Exception as error: - return await self.handle_error(error) + return None + #return await self.handle_error(error) @commands.command() async def generate_blog(self, ctx):