mirror of
https://github.com/ION606/ion-cli.git
synced 2026-05-14 22:16:56 +00:00
Finished? The 'anime' command
This commit is contained in:
@@ -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]);
|
||||
|
||||
Reference in New Issue
Block a user