allow calling so replybot can do regular statuses

This commit is contained in:
matty 2023-02-10 08:27:57 -05:00
parent 6601b853b7
commit 687a99fb39

View File

@ -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);