Added gogoanime integration

This commit is contained in:
ION606
2023-03-17 21:33:34 -04:00
parent 16868426c0
commit 8f2fe725a3
6 changed files with 169 additions and 94 deletions
+21 -1
View File
@@ -1,6 +1,7 @@
import chalk from "chalk";
import readline from 'readline'
export default function generateQuery(context) {
export function generateQuery(context) {
var query;
if (context == "animeep") {
query = "To dump all data enter ";
@@ -14,4 +15,23 @@ export default function generateQuery(context) {
}
return query;
}
/**
* @param {String} query
* @returns {Promise<String>}
*/
export function askUserQuery(query) {
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout,
});
return new Promise(resolve => rl.question(query, ans => {
rl.close();
resolve(ans);
}))
}