From be68cece478b116e31f4d5c5d910408b84e55702 Mon Sep 17 00:00:00 2001 From: Nestpebble <116762865+Nestpebble@users.noreply.github.com> Date: Mon, 16 Sep 2024 10:11:24 +0100 Subject: [PATCH] Update mesh_bot.py --- mesh_bot.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mesh_bot.py b/mesh_bot.py index a44c4fe..206c231 100755 --- a/mesh_bot.py +++ b/mesh_bot.py @@ -44,6 +44,7 @@ def auto_response(message, snr, rssi, hop, message_from_id, channel_number, devi "ack": lambda: handle_ack(hop, snr, rssi), "testing": lambda: handle_testing(message, hop, snr, rssi), "test": lambda: handle_testing(message, hop, snr, rssi), + "whoami": lambda: handle_whoami(message_from_id, deviceID, channel_number), } cmds = [] # list to hold the commands found in the message for key in command_handler: @@ -316,6 +317,9 @@ def handle_testing(message, hop, snr, rssi): else: return "🎙Testing 1,2,3 " + hop +def handle_whoami(message_from_id, deviceID, channel_number) + return "You are " + message_from_id + " on " + channel_number + "being received by " + deviceID + def onDisconnect(interface): global retry_int1, retry_int2 rxType = type(interface).__name__