splatoon3.ink/app/index.mjs
Matt Isenhower 4d02454231 Add cron
2022-09-01 17:36:28 -07:00

20 lines
338 B
JavaScript

import dotenv from 'dotenv';
import cron from './cron.mjs';
import { sendTweets } from './twitter/index.mjs';
dotenv.config();
const actions = {
cron,
twitter: sendTweets,
}
const command = process.argv[2];
const action = actions[command];
if (action) {
action();
} else {
console.error(`Unrecognized command: ${command}`);
}