fix missing return

This commit is contained in:
2024-05-12 23:51:19 +08:00
parent d079271ef9
commit e629899a72
+5 -4
View File
@@ -173,10 +173,11 @@ async def cmd_set_template(update: Update, context: ContextTypes.DEFAULT_TYPE) -
if not reply: if not reply:
await update.effective_message.reply_text("Please reply to a message to set as template.") await update.effective_message.reply_text("Please reply to a message to set as template.")
return return
if '[]' in reply.text_html: if '[]' not in reply.text_html:
context.user_data['template'] = reply.text_html await update.effective_message.reply_text("Please reply to a message with [] to set as template.")
await update.effective_message.reply_text("Template set.") return
await update.effective_message.reply_text("Please reply to a message with [] to set as template.") context.user_data['template'] = reply.text_html
await update.effective_message.reply_text("Template set.")
@send_action(ChatAction.TYPING) @send_action(ChatAction.TYPING)