2023-02-10 01:18:05 +00:00
|
|
|
#!/home/bot/.nvm/versions/node/v18.14.0/bin/node
|
|
|
|
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
import 'dotenv/config';
|
2023-02-10 13:12:07 +00:00
|
|
|
import { postRegularStatus, postReply } from './lib/replybot.js';
|
2023-02-10 01:18:05 +00:00
|
|
|
|
|
|
|
const choice = process.argv[2]; // command line switch
|
|
|
|
|
|
|
|
try{
|
|
|
|
switch (choice.toLowerCase()){
|
2023-02-10 13:27:57 +00:00
|
|
|
case 'replybot': // node nice-bot.js replybot [reply]
|
|
|
|
process.argv[3] === 'reply' ? postReply() : postRegularStatus();
|
|
|
|
break;
|
2023-02-10 01:18:05 +00:00
|
|
|
default:
|
2023-02-10 13:27:57 +00:00
|
|
|
console.log('Something went wrong with nice-bot (ya dun goof\'d)');
|
|
|
|
break;
|
2023-02-10 01:18:05 +00:00
|
|
|
};
|
|
|
|
} catch (error){
|
|
|
|
throw Error(error);
|
|
|
|
}
|