This commit is contained in:
dlinux-host 2025-01-20 17:09:50 -05:00
parent 8be1a6ae9e
commit 8734ca8a9f

View File

@ -240,6 +240,38 @@ try {
break; 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 <command> - execute a command in the container shell",
"• !notify <message> - 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 // Command: !stats
// //