22 lines
434 B
JavaScript
Executable File
22 lines
434 B
JavaScript
Executable File
#!/home/bot/.nvm/versions/node/v18.14.0/bin/node
|
|
|
|
'use strict';
|
|
|
|
import 'dotenv/config';
|
|
import { postReply } from './lib/replybot.js';
|
|
|
|
const choice = process.argv[2]; // command line switch
|
|
|
|
try{
|
|
switch (choice.toLowerCase()){
|
|
case 'replybot':
|
|
await postReply();
|
|
break;
|
|
default:
|
|
console.log('Something went wrong with nice-bot (ya dun goof\'d)');
|
|
break;
|
|
};
|
|
} catch (error){
|
|
throw Error(error);
|
|
}
|