From f29aec3d186ad1030957a3e29e60400510e93b57 Mon Sep 17 00:00:00 2001 From: kingston 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: