fixed returning of url in get_dalle
This commit is contained in:
parent
64c11f6878
commit
2a7f6893c2
1 changed files with 2 additions and 1 deletions
|
|
@ -115,7 +115,8 @@ class ChatGPT(commands.Cog):
|
||||||
try:
|
try:
|
||||||
async with self.bot.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_data = await resp.json()
|
||||||
response = response_data[0]['url']
|
print(response_data)
|
||||||
|
response = response_data['data'][0]['url']
|
||||||
return response
|
return response
|
||||||
|
|
||||||
except Exception as error:
|
except Exception as error:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue