Update mesh-bot.py

This commit is contained in:
SpudGunMan
2024-06-19 23:18:09 -07:00
parent 01d48fd935
commit ea55ad76b6
+3 -2
View File
@@ -239,13 +239,14 @@ def get_node_location(number):
return position
def send_message(message,ch,nodeid):
message_for_log = message.replace("\n", "")
if nodeid == 0:
#Send to channel
print (f"{log_timestamp()} System: Sending: {message.replace("\n", "")} To: Channel:{ch}")
print (f"{log_timestamp()} System: Sending: {message_for_log} To: Channel:{ch}")
interface.sendText(text=message,channelIndex=ch)
else:
#Send to DM
print (f"{log_timestamp()} System: Sending: {message.replace("\n", "")} To: {get_name_from_number(nodeid)}")
print (f"{log_timestamp()} System: Sending: {message_for_log} To: {get_name_from_number(nodeid)}")
interface.sendText(text=message,channelIndex=ch,destinationId=nodeid)
def exit_handler(signum, frame):