Update mesh_bot.py

This commit is contained in:
SpudGunMan
2024-08-12 02:53:24 -07:00
parent ba6c296b14
commit 80da793c8d

View File

@@ -49,7 +49,7 @@ def auto_response(message, snr, rssi, hop, message_from_id, channel_number, devi
if len(cmds) > 0:
# sort the commands by index
cmds.sort(key=lambda x: x[3])
cmds.sort(key=lambda x: x['index'])
logger.debug(f"System: Bot Detected: {cmds}")
# run the last command found in the message
bot_response = command_handler[cmds[0]]()