From 8657adb46345ea01f781e0315bbe8c70f1bb810c Mon Sep 17 00:00:00 2001 From: Karim Iskakov Date: Fri, 21 Apr 2023 05:20:20 -0500 Subject: [PATCH] Fix bot mention in group chat --- bot/bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/bot.py b/bot/bot.py index 49ed2d8..6fcb0dd 100644 --- a/bot/bot.py +++ b/bot/bot.py @@ -119,7 +119,7 @@ async def is_bot_mentioned(update: Update, context: CallbackContext): if message.chat.type == "private": return True - if message.text is not None and config.bot_username in message.text: + if message.text is not None and ("@" + context.bot.username) in message.text: return True if message.reply_to_message is not None: