From 82ba5067492b80c21130d092a57426b5b95551b4 Mon Sep 17 00:00:00 2001 From: Logan Cusano Date: Sun, 26 Mar 2023 20:40:52 -0400 Subject: [PATCH] Update exports for console commands --- Client/utilities/executeConsoleCommands.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Client/utilities/executeConsoleCommands.js b/Client/utilities/executeConsoleCommands.js index 99ccc6c..a4a2e55 100644 --- a/Client/utilities/executeConsoleCommands.js +++ b/Client/utilities/executeConsoleCommands.js @@ -8,7 +8,7 @@ const log = new DebugBuilder("client-bot", "executeConsoleCommands"); const execCommand = promisify(exec); -exports.executeAsyncConsoleCommand = async function executeAsyncConsoleCommand(consoleCommand) { +async function executeAsyncConsoleCommand(consoleCommand) { // Check to see if the command is a real command // TODO needs to be improved const acceptableCommands = [ "arecord -L" ]; @@ -26,8 +26,9 @@ exports.executeAsyncConsoleCommand = async function executeAsyncConsoleCommand(c // TODO add some error checking return output; } +exports.executeAsyncConsoleCommand = executeAsyncConsoleCommand; -exports.returnAlsaDeviceObject = async function returnAlsaDeviceObject() { +async function returnAlsaDeviceObject() { const listAlsaDevicesCommand = "arecord -L"; const commandResponse = await executeAsyncConsoleCommand(listAlsaDevicesCommand); const brokenCommand = String(commandResponse).split('\n'); @@ -46,4 +47,6 @@ exports.returnAlsaDeviceObject = async function returnAlsaDeviceObject() { } return devices; -} \ No newline at end of file +} + +exports.returnAlsaDeviceObject = returnAlsaDeviceObject; \ No newline at end of file