diff --git a/worker/src/bot.py b/worker/src/bot.py index 9d9b6fa..a06ec52 100644 --- a/worker/src/bot.py +++ b/worker/src/bot.py @@ -150,6 +150,7 @@ def _kw_action_keyboard(kw_id: str, is_active: bool) -> InlineKeyboardMarkup: [InlineKeyboardButton(toggle_btn, callback_data=f"toggle:{sid}"), InlineKeyboardButton("✏️ Edit", callback_data=f"edit_menu:{sid}")], [InlineKeyboardButton("🗑 Remove", callback_data=f"remove_confirm:{sid}")], + [InlineKeyboardButton("↩ Back to Menu", callback_data="menu:")], ]) @@ -289,8 +290,8 @@ async def text_input_handler(update: Update, context: ContextTypes.DEFAULT_TYPE) kw_id = str(uuid.uuid4()) await update.message.reply_text( # type: ignore[union-attr] f'I will add this keyword to your watchlist:\n\n' - f'
"{text}"
\n\n' - f"Interval: 5 min (default)\n\nLooks good?", + f'Keyword: {text}\n' + f'Interval: 5 min (default)\n\nLooks good?', parse_mode="HTML", reply_markup=_confirm_add_keyboard(kw_id), ) @@ -306,7 +307,7 @@ async def text_input_handler(update: Update, context: ContextTypes.DEFAULT_TYPE) encoded_name = _b64(text) await update.message.reply_text( # type: ignore[union-attr] - f'New keyword name:\n\n
"{text}"
\n\nLooks good?', + f'New keyword name:\n\n{text}\n\nLooks good?', parse_mode="HTML", reply_markup=InlineKeyboardMarkup([ [InlineKeyboardButton("✅ Yes", callback_data=f"confirm_name:{kw_id}:{encoded_name}"), @@ -679,10 +680,10 @@ async def _handle_callback(update: Update, context: ContextTypes.DEFAULT_TYPE) - "Enter interval in minutes (1–1440):", parse_mode="HTML") elif action == "set_interval": - sub_parts = payload.split(":", 2) - if len(sub_parts) < 3: + sub_parts = payload.split(":", 1) + if len(sub_parts) < 2: return - sid, minutes_str = sub_parts[0], sub_parts[2] + sid, minutes_str = sub_parts[0], sub_parts[1] try: minutes = int(minutes_str) except ValueError: