-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
37 lines (23 loc) · 785 Bytes
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import Bot from'./bot.js';
const bot = new Bot();
const app = async () => {
let args = process.argv.splice(2).join(' ').split(',');
if (args.length > 1) {
let number = parseInt(args[1]);
if (number >= 0 && number < 20) {
await bot.init();
await bot.input(args[0]);
await bot.getImage();
for (let index = 0; index < number; index++) {
await bot.inputReRender();
await bot.getImage();
}
return;
}else{
console.log("Please enter a number bewteen 1 and 20");
}
}else{
console.log("No arguments passed : node app.js [text], [number]");
}
};
app();