From 2a7f6893c2cd832768cf878cd407b61b3555ce78 Mon Sep 17 00:00:00 2001 From: phixxy Date: Sat, 27 Jan 2024 17:14:44 -0800 Subject: [PATCH] fixed returning of url in get_dalle --- extensions/chatgpt.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extensions/chatgpt.py b/extensions/chatgpt.py index 2c71d52..314ff60 100644 --- a/extensions/chatgpt.py +++ b/extensions/chatgpt.py @@ -115,7 +115,8 @@ class ChatGPT(commands.Cog): try: async with self.bot.http_session.post(url, headers=headers, json=data) as resp: response_data = await resp.json() - response = response_data[0]['url'] + print(response_data) + response = response_data['data'][0]['url'] return response except Exception as error: