Finished? The 'anime' command

This commit is contained in:
Itamar Oren
2023-02-26 17:59:11 -05:00
parent a1db1a1400
commit 7fc72d7c01
7 changed files with 891 additions and 25 deletions
+7
View File
@@ -5,6 +5,7 @@ import { getAndParse } from './startup/getAndParseArgs.js';
import animeMain from './anime/getAndSave.js';
import help from './help.js'
function executeCommand(command, content = null) {
return new Promise((resolve) => {
switch(command) {
@@ -21,8 +22,14 @@ function executeCommand(command, content = null) {
});
}
async function main() {
const args = await getAndParse();
if (JSON.stringify(args) == "{}") {
return await executeCommand('error');
}
for (const i in args) {
// console.log(chalk.blue(i) + ": " + args[i])
const worked = await executeCommand(i, args[i]);