From edc3ea1601b19fd370a84f14c0706455ea6f4a12 Mon Sep 17 00:00:00 2001 From: Bryan Schwab Date: Wed, 22 May 2024 09:16:50 -0700 Subject: [PATCH] Fixing group messaging --- bot/run.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bot/run.py b/bot/run.py index f9fd3b6..c1d95fe 100644 --- a/bot/run.py +++ b/bot/run.py @@ -203,7 +203,8 @@ async def handle_response(message, response_data, full_response): return False async def send_response(message, text): - if message.chat.id == message.from_user.id: + # A negative message.chat.id is a group message + if message.chat.id < 0 or message.chat.id == message.from_user.id: await bot.send_message(chat_id=message.chat.id, text=text) else: await bot.edit_message_text(