Update exports for console commands
This commit is contained in:
@@ -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;
|
||||
Reference in New Issue
Block a user