From 2ddde85fca997517a84c96e3d82e3087b111c493 Mon Sep 17 00:00:00 2001 From: ChrisChrome Date: Sat, 23 Mar 2024 17:48:35 -0600 Subject: [PATCH] ASd --- index.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/index.js b/index.js index a35e73d..88b69c6 100644 --- a/index.js +++ b/index.js @@ -1070,16 +1070,20 @@ dcClient.on('interactionCreate', async interaction => { // switch subcommand switch (interaction.options.getSubcommand()) { case "silence": // SSH run `asterisk -x "channel request hangup all" - await interaction.deferReply({ - ephemeral: true - }); + sshConn.exec("asterisk -x 'channel request hangup all'", (err, stream) => { if (err) { - interaction.editReply(`Error killing calls: ${err}`); + interaction.reply({ + content: `Error killing calls: ${err}`, + ephemeral: true + }); sendLog(`${colors.red("[ERROR]")} ${err}`); } stream.on("exit", (code) => { - interaction.editReply("Killed all calls!"); + interaction.editReply({ + content: "Killed all calls!", + ephemeral: true + }); sendLog(`${colors.green("[INFO]")} Silenced all channels`); }) });