mirror of
https://github.com/TheCommsChannel/TC2-BBS-mesh.git
synced 2025-08-09 23:22:20 -04:00
Update command_handlers.py
This commit is contained in:
parent
c775d8d5df
commit
ef7653847d
1 changed files with 6 additions and 5 deletions
|
@ -25,6 +25,7 @@ main_menu_items = config['menu']['main_menu_items'].split(',')
|
||||||
bbs_menu_items = config['menu']['bbs_menu_items'].split(',')
|
bbs_menu_items = config['menu']['bbs_menu_items'].split(',')
|
||||||
utilities_menu_items = config['menu']['utilities_menu_items'].split(',')
|
utilities_menu_items = config['menu']['utilities_menu_items'].split(',')
|
||||||
|
|
||||||
|
|
||||||
def build_menu(items, menu_name, mails, date):
|
def build_menu(items, menu_name, mails, date):
|
||||||
menu_str = f"{menu_name}\n"
|
menu_str = f"{menu_name}\n"
|
||||||
for item in items:
|
for item in items:
|
||||||
|
@ -80,7 +81,7 @@ def handle_mail_command(sender_id, interface):
|
||||||
|
|
||||||
def handle_bulletin_command(sender_id, interface):
|
def handle_bulletin_command(sender_id, interface):
|
||||||
date = get_hot_bulletin("general")
|
date = get_hot_bulletin("general")
|
||||||
response = f"📰Bulletin Menu📰\nWhich board would you like to enter?\n[G]eneral (" + datum(date[0]) + ")\n"
|
response = f"📰Bulletin Menu📰\nSelect the board to enter?\n[G]eneral (" + datum(date[0]) + ")\n"
|
||||||
date = get_hot_bulletin("info")
|
date = get_hot_bulletin("info")
|
||||||
response += "[I]nfo (" + datum(date[0]) + ")\n"
|
response += "[I]nfo (" + datum(date[0]) + ")\n"
|
||||||
date = get_hot_bulletin("news")
|
date = get_hot_bulletin("news")
|
||||||
|
@ -198,7 +199,7 @@ def handle_bb_steps(sender_id, message, step, state, interface, bbs_nodes):
|
||||||
update_user_state(sender_id, {'command': 'BULLETIN_DELETE', 'step': 3, 'board': board_name})
|
update_user_state(sender_id, {'command': 'BULLETIN_DELETE', 'step': 3, 'board': board_name})
|
||||||
else:
|
else:
|
||||||
send_message(f"No bulletins in {board_name}.", sender_id, interface)
|
send_message(f"No bulletins in {board_name}.", sender_id, interface)
|
||||||
handle_bb_steps(sender_id, 'e', 1, state, interface, bbs_nodes) elif message.lower() == 'p':
|
handle_bb_steps(sender_id, 'e', 1, state, interface, bbs_nodes)
|
||||||
elif message.lower() == 'p':
|
elif message.lower() == 'p':
|
||||||
if board_name.lower() == 'urgent':
|
if board_name.lower() == 'urgent':
|
||||||
node_id = get_node_id_from_num(sender_id, interface)
|
node_id = get_node_id_from_num(sender_id, interface)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue