fixed returning of url in get_dalle

This commit is contained in:
phixxy 2024-01-27 17:14:44 -08:00
parent 64c11f6878
commit 2a7f6893c2

View file

@ -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: