From 6df7d68f5ac936b4df3e67e2c7c33de695b8abb2 Mon Sep 17 00:00:00 2001 From: Michelle Date: Sat, 25 Apr 2026 16:47:08 +0200 Subject: [PATCH] fix: update dog and fox commands, they should actually work now --- main.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.py b/main.py index 6a499b5..1e48715 100644 --- a/main.py +++ b/main.py @@ -139,8 +139,8 @@ async def dog(message): response = requests.get("https://dog.ceo/api/breeds/image/random") if response.status_code == 200: data = response.json() - if data and isinstance(data, list) and "message" in data[0]: - await message.channel.send(data[0]["message"]) + if data and isinstance(data, dict) and "message" in data: + await message.channel.send(data["message"]) else: await message.channel.send("Could not fetch dog image") else: @@ -151,8 +151,8 @@ async def fox(message): response = requests.get("https://randomfox.ca/floof/") if response.status_code == 200: data = response.json() - if data and isinstance(data, list) and "image" in data[0]: - await message.channel.send(data[0]["image"]) + if data and isinstance(data, dict) and "image" in data: + await message.channel.send(data["image"]) else: await message.channel.send("Could not fetch fox image") else: