This commit is contained in:
SpudGunMan
2024-06-25 15:37:25 -07:00
parent 8e750ac18a
commit a69b046a98
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -19,7 +19,7 @@ interface = meshtastic.serial_interface.SerialInterface() #serial interface
#interface=meshtastic.ble_interface.BLEInterface("AA:BB:CC:DD:EE:FF") # BLE interface
#A list of strings to trap and respond to
trap_list = ("ping","ack","testing","pong","motd","help","sun","solar","hfcond","lheard","whereami","tide","moon","wx","joke")
trap_list = ("ping","ack","testing","pong","motd","help","sun","solar","hfcond","lheard","sitrep","whereami","tide","moon","wx","joke")
welcome_message = "MeshBot, here for you like a friend who is not. Try sending: ping @foo or, help"
help_message = "Commands are: ack, hfcond, joke, Lheard, moon, motd, ping, solar, sun, tide, whereami, wx"
@@ -75,7 +75,7 @@ def auto_response(message, snr, rssi, hop, message_from_id):
bot_response = hf_band_conditions()
elif "solar" in message.lower():
bot_response = drap_xray_conditions() + "\n" + solar_conditions()
elif "lheard" in message.lower():
elif "lheard" in message.lower() or "sitrep" in message.lower():
bot_response = "Last 5 nodes heard:\n" + str(get_node_list())
elif "whereami" in message.lower():
location = get_node_location(message_from_id)
+2 -2
View File
@@ -15,7 +15,7 @@ interface = meshtastic.serial_interface.SerialInterface() #serial interface
#interface=meshtastic.tcp_interface.TCPInterface(hostname="192.168.0.1") # IP of your device
#interface=meshtastic.ble_interface.BLEInterface("AA:BB:CC:DD:EE:FF") # BLE interface
trap_list = ("ping","ack","testing","pong","motd","help","lheard") #A list of strings to trap and respond to
trap_list = ("ping","ack","testing","pong","motd","help","lheard","sitrep") #A list of strings to trap and respond to
welcome_message = "PongBot, here for you like a friend who is not. Try sending: ping @foo or, help"
help_message = "Commands are: ping, ack, motd, Lheard. Use 'motd $foo' to set MOTD."
RESPOND_BY_DM_ONLY = True # Set to True to respond messages via DM only (keeps the channel clean)
@@ -62,7 +62,7 @@ def auto_response(message, snr, rssi, hop):
bot_response = MOTD
elif "help" in message.lower():
bot_response = help_message
elif "lheard" in message.lower():
elif "lheard" in message.lower() or "sitrep" in message.lower():
bot_response = "Last 5 nodes heard:\n" + str(get_node_list())
else:
bot_response = "I'm sorry, I'm afraid I can't do that."