From 8734ca8a9feeab31e43b116790a9014e9b45b4c2 Mon Sep 17 00:00:00 2001 From: dlinux-host Date: Mon, 20 Jan 2025 17:09:50 -0500 Subject: [PATCH] update --- teamspeak.js | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/teamspeak.js b/teamspeak.js index 8290784..aa9f374 100644 --- a/teamspeak.js +++ b/teamspeak.js @@ -240,6 +240,38 @@ try { break; } + + // + // Command: !help + // + case "help": { + // Construct a help message listing each command + const helpMessage = [ + "Here are the available commands:", + "• !hello - returns a 'hello' from the API", + "• !name - shows your API username", + "• !stats - shows container stats", + "• !uptime - shows container uptime", + "• !start / !stop / !restart - controls the container", + "• !info - shows container info (IP, status, etc.)", + "• !time - shows container expire time", + "• !root-password - generates a new root password", + "• !new-api-key - generates a new API key", + "• !key-expire-time - shows when current key expires", + "• !x - execute a command in the container shell", + "• !notify - send a notification via the API", + "• !help - show this help message" + ].join("\n"); + + // Send the help message back to the same target (channel or server) + await ts3.sendTextMessage( + event.target, + targetmode, + `${senderNickname},\n${helpMessage}` + ); + break; + } + // // Command: !stats //