Skip to content

Commit 5062280

Browse files
committed
made group trigger keyword case insensitive
fix #140
1 parent b47768b commit 5062280

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bot/telegram_bot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ async def prompt(self, update: Update, context: ContextTypes.DEFAULT_TYPE):
345345

346346
if self.is_group_chat(update):
347347
trigger_keyword = self.config['group_trigger_keyword']
348-
if prompt.startswith(trigger_keyword):
348+
if prompt.lower().startswith(trigger_keyword.lower()):
349349
prompt = prompt[len(trigger_keyword):].strip()
350350
else:
351351
if update.message.reply_to_message and update.message.reply_to_message.from_user.id == context.bot.id:

0 commit comments

Comments
 (0)