From 8287efae0d5f8b248aa7a3d3ec20552e418b2ebc Mon Sep 17 00:00:00 2001 From: Kingston-SCYD Date: Sun, 16 Aug 2026 23:22:47 -0500 Subject: [PATCH] Handle empty API responses gracefully --- assistant/assistant.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/assistant/assistant.py b/assistant/assistant.py index 56b6429..62eefaf 100644 --- a/assistant/assistant.py +++ b/assistant/assistant.py @@ -110,6 +110,10 @@ class Assistant(commands.Cog): await message.reply("No response from the assistant.") return + if not reply.strip(): + await message.reply("*(The assistant returned an empty response.)*") + return + if len(reply) <= 2000: await message.reply(reply) else: