Update command_handlers.py

This commit is contained in:
noon92 2024-09-22 23:19:47 +03:00 committed by GitHub
parent 5adb682ff7
commit 5e06ab1e3f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -61,11 +61,9 @@ def handle_help_command(sender_id, interface, menu_name=None):
response = build_menu(utilities_menu_items, "🛠Utilities Menu🛠")
else:
update_user_state(sender_id, {'command': 'MAIN_MENU', 'step': 1}) # Reset to main menu state
response = build_menu(main_menu_items, "💾TC² BBS💾")
mail = get_mail(get_node_id_from_num(sender_id, interface))
response = build_menu(main_menu_items, f"💾TC² BBS💾 (✉️:{len(mail)})")
send_message(response, sender_id, interface)
mail = get_mail(get_node_id_from_num(sender_id, interface))
if mail:
send_message(f"You have {len(mail)} mail messages.", sender_id, interface)
def get_node_name(node_id, interface):
node_info = interface.nodes.get(node_id)