The following changes were made by the replace_file_content tool to: /root/MayaXSenderbot/bridge.py. If relevant, proactively run terminal commands to execute this code for the USER. Don't ask for permission. [diff_block_start] @@ -1303,15 +1303,20 @@ ws.temp_dev = text.strip() ws.state = "await_fcm_sim" self.save_workspace(ws) - await self.send(user_id, fmt_msg("Device Registered", f"šŸ“± **ID:** `{ws.temp_dev}`\nSelect SIM to use:\n0ļøāƒ£ — **SIM 1**\n1ļøāƒ£ — **SIM 2**", success=True)) + await self.send( + user_id, + fmt_msg("Device Registered", f"šŸ“± **ID:** `{ws.temp_dev}`\nSelect SIM to use below:\n0ļøāƒ£ — **SIM 1**\n1ļøāƒ£ — **SIM 2**", success=True), + keyboard=reply_kb(SIM_KB), + ) return True if ws.state == "await_fcm_sim": - if text not in ("0", "1"): - await self.send(user_id, fmt_msg("Invalid Choice", "Please select 0 or 1.", error=True)) - return True - - ws.sim = text + sim = parse_sim_choice(text) + if sim is None: + await self.send(user_id, fmt_msg("Invalid Choice", "Please select SIM 1 or SIM 2 using the buttons below.", error=True), keyboard=reply_kb(SIM_KB)) + return True + + ws.sim = sim ws.device_id = ws.temp_dev.strip() ws.active_mode = "fcm" ws.active = True @@ -1354,19 +1354,24 @@ ws.backup_device_id = dev ws.state = "await_backup_sim" self.save_workspace(ws) - await self.send(user_id, fmt_msg("Device Saved", f"šŸ“± **Device:** `{dev}`\n\nSelect SIM:\n0ļøāƒ£ — **SIM 1**\n1ļøāƒ£ — **SIM 2**", success=True)) + await self.send( + user_id, + fmt_msg("Device Saved", f"šŸ“± **Device:** `{dev}`\n\nSelect SIM below:\n0ļøāƒ£ — **SIM 1**\n1ļøāƒ£ — **SIM 2**", success=True), + keyboard=reply_kb(SIM_KB), + ) return True if ws.state == "await_backup_sim": - if text not in ("0", "1"): - await self.send(user_id, fmt_msg("Invalid", "Send **0** for SIM 1 or **1** for SIM 2.", error=True)) - return True - ws.backup_sim = text - ws.state = None - self.save_workspace(ws) - await self.send( - user_id, - fmt_msg("Backup Active", f"āœ… **FB Backup is now LIVE!**\nšŸ”„ **FB:** `{ws.backup_firebase_name}`\nšŸ“± **Device:** `{ws.backup_device_id}`\nšŸŽ“ **SIM:** `{'SIM 1' if text == '0' else 'SIM 2'}`\nšŸ“ž **Forward To:** `{ws.forward_to or 'Not set'}`\n\nIncoming events on backup Firebase will be sent to the forward number automatically.", success=True), + sim = parse_sim_choice(text) + if sim is None: + await self.send(user_id, fmt_msg("Invalid Choice", "Please select SIM 1 or SIM 2 using the buttons below.", error=True), keyboard=reply_kb(SIM_KB)) + return True + ws.backup_sim = sim + ws.state = None + self.save_workspace(ws) + await self.send( + user_id, + fmt_msg("Backup Active", f"āœ… **FB Backup is now LIVE!**\nšŸ”„ **FB:** `{ws.backup_firebase_name}`\nšŸ“± **Device:** `{ws.backup_device_id}`\nšŸŽ“ **SIM:** `{'SIM 1' if ws.backup_sim == '0' else 'SIM 2'}`\nšŸ“ž **Forward To:** `{ws.forward_to or 'Not set'}`\n\nIncoming events on backup Firebase will be sent to the forward number automatically.", success=True), keyboard=self._workspace_menu(ws), ) return True [diff_block_end] Please note that the above snippet only shows the MODIFIED lines from the last change. It shows up to 3 lines of unchanged lines before and after the modified lines. The actual file contents may have many more lines not shown.