From 1996d4eeee2490b964857f14e053c784dfb31823 Mon Sep 17 00:00:00 2001 From: phixxy Date: Mon, 22 Jan 2024 15:13:28 -0800 Subject: [PATCH] random choice of image now --- extensions/waifu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/waifu.py b/extensions/waifu.py index e4c9a09..118cd3d 100644 --- a/extensions/waifu.py +++ b/extensions/waifu.py @@ -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.":