Skip to content

Commit

Permalink
modules.komaru: trigger: Reply to the replied msg if possible
Browse files Browse the repository at this point in the history
  • Loading branch information
hakimifr committed Feb 29, 2024
1 parent 125538e commit 7567599
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/komaru.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,10 @@ async def trigger_handler(update: Update, context: ContextTypes.DEFAULT_TYPE):
for value in config_db.config.values():
for keyword in value["trigger_keywords"]:
if keyword.lower() in update.message.text.lower():
await update.message.reply_animation(value["file_id"])
if update.message.reply_to_message:
await update.message.reply_to_message.reply_animation(value["file_id"])
else:
await update.message.reply_animation(value["file_id"])
return


Expand Down

0 comments on commit 7567599

Please sign in to comment.