Skip to content

Commit

Permalink
made group trigger keyword case insensitive
Browse files Browse the repository at this point in the history
fix #140
  • Loading branch information
n3d1117 committed Apr 1, 2023
1 parent b47768b commit 5062280
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bot/telegram_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ async def prompt(self, update: Update, context: ContextTypes.DEFAULT_TYPE):

if self.is_group_chat(update):
trigger_keyword = self.config['group_trigger_keyword']
if prompt.startswith(trigger_keyword):
if prompt.lower().startswith(trigger_keyword.lower()):
prompt = prompt[len(trigger_keyword):].strip()
else:
if update.message.reply_to_message and update.message.reply_to_message.from_user.id == context.bot.id:
Expand Down

0 comments on commit 5062280

Please sign in to comment.