feature/implement-bot-into-client-core #2

Merged
logan merged 42 commits from feature/implement-bot-into-client-core into master 2023-05-06 14:45:00 -04:00
Showing only changes of commit 82ba506749 - Show all commits

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;