mirror of
https://github.com/SpudGunMan/meshing-around.git
synced 2026-08-05 16:32:54 +02:00
Update mesh-bot.py
This commit is contained in:
+6
-2
@@ -65,12 +65,16 @@ def auto_response(message,snr,rssi,hop,message_from_id):
|
||||
elif "help" in message.lower():
|
||||
bot_response = help_message
|
||||
elif "sun" in message.lower():
|
||||
suntime = get_sunrise_sunset(get_node_location(message_from_id))
|
||||
location = get_node_location(message_from_id)
|
||||
lat = location[0]
|
||||
lon = location[1]
|
||||
print (f"Using Reported Location: {location}")
|
||||
suntime = get_sunrise_sunset(lat,lon)
|
||||
bot_response = "Sunrise: " + suntime[0] + "\nSunset: " + suntime[1]
|
||||
elif "hfcond" in message.lower():
|
||||
bot_response = hf_band_conditions()
|
||||
elif "solar" in message.lower():
|
||||
bot_response = drap_xray_conditions() + "\n" + solar_conditions(get_node_location)
|
||||
bot_response = drap_xray_conditions() + "\n" + solar_conditions()
|
||||
elif "lheard" in message.lower():
|
||||
bot_response = "Last 5 nodes heard: " + str(get_node_list())
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user