import config from "./config"; import * as jobs from "./jobs"; import * as cliArgs from "ts-command-line-args"; const args = cliArgs.parse<{ id?: number; help?: boolean; }>( { id: { type: Number, optional: true }, help: { type: Boolean, optional: true, alias: "h" }, }, { helpArg: "help", } ); (async () => { if (!config.mastodon.token) { console.error("MASTODON_TOKEN not set"); return; } if (args.id) { await jobs.postSpecificPicture(args.id); } else { await jobs.postRandomPicture(); } })();