allow calling so replybot can do regular statuses
This commit is contained in:
parent
6601b853b7
commit
687a99fb39
13
nice-bot.js
13
nice-bot.js
@ -9,15 +9,12 @@ const choice = process.argv[2]; // command line switch
|
|||||||
|
|
||||||
try{
|
try{
|
||||||
switch (choice.toLowerCase()){
|
switch (choice.toLowerCase()){
|
||||||
case 'replybot reply': // you can choose "reply" or "status" from here when calling in Crontab
|
case 'replybot': // node nice-bot.js replybot [reply]
|
||||||
await postReply();
|
process.argv[3] === 'reply' ? postReply() : postRegularStatus();
|
||||||
break;
|
break;
|
||||||
case 'replybot status':
|
|
||||||
await postRegularStatus();
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
console.log('Something went wrong with nice-bot (ya dun goof\'d)');
|
console.log('Something went wrong with nice-bot (ya dun goof\'d)');
|
||||||
break;
|
break;
|
||||||
};
|
};
|
||||||
} catch (error){
|
} catch (error){
|
||||||
throw Error(error);
|
throw Error(error);
|
||||||
|
Loading…
Reference in New Issue
Block a user