random choice of image now

This commit is contained in:
phixxy 2024-01-22 15:13:28 -08:00
parent f7f9ddef68
commit 1996d4eeee

View file

@ -17,7 +17,7 @@ class Waifu(commands.Cog):
async with self.bot.http_session.get(self.url, params=params) as resp:
resp_data = await resp.json()
try:
image = resp_data['images'][0]
image = random.choice(resp_data['images'])
return image['url']
except:
if resp_data['detail'] == "No image found matching the criteria given.":