Update exports for console commands

This commit is contained in:
Logan Cusano
2023-03-26 20:40:52 -04:00
parent f995cd3578
commit 82ba506749

View File

@@ -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;
}
}
exports.returnAlsaDeviceObject = returnAlsaDeviceObject;