Send root pass as DM
This commit is contained in:
parent
8734ca8a9f
commit
31fa431cef
10
teamspeak.js
10
teamspeak.js
@ -377,8 +377,14 @@ try {
|
||||
//
|
||||
case "root-password": {
|
||||
const rootPassResponse = await makeApiRequest("/rootpass", token, client);
|
||||
const reply = `Root Password:\nNew Root Password: ${rootPassResponse.newRootPass}`;
|
||||
await ts3.sendTextMessage(event.target, targetmode, `${senderNickname}, ${reply}`);
|
||||
try {
|
||||
// Send a private message to the user to request the token
|
||||
await client.message(
|
||||
`Root Password:\nNew Root Password: ${rootPassResponse.newRootPass}`
|
||||
);
|
||||
} catch (error) {
|
||||
console.error(`Failed to send DM to ${client.nickname}:`, error);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user