From 2cb0518835bea73f03ec07911c7e0394e75ae9ec Mon Sep 17 00:00:00 2001 From: Yasir Aris M Date: Mon, 15 Jan 2024 06:54:53 +0700 Subject: [PATCH] Forgot about this Signed-off-by: Yasir Aris M --- misskaty/plugins/chatbot_ai.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misskaty/plugins/chatbot_ai.py b/misskaty/plugins/chatbot_ai.py index a41c0e08..1bd41fe8 100644 --- a/misskaty/plugins/chatbot_ai.py +++ b/misskaty/plugins/chatbot_ai.py @@ -55,7 +55,7 @@ async def gemini_chatbot(_, ctx: Message, strings): json=json_data, timeout=20.0, ) - if response.json().get("candidates"): + if not response.json().get("candidates"): return await msg.edit_msg("⚠️ Sorry, the prompt you sent maybe contains a forbidden word that is not permitted by AI.") await msg.edit_msg(html.escape(response.json()["candidates"][0]["content"]["parts"][0]["text"])) except Exception as e: