Integrated e-mail alerts, added dialog option for release alerts.
This commit is contained in:
25
tools/notify.js
Normal file
25
tools/notify.js
Normal file
@@ -0,0 +1,25 @@
|
||||
import process from 'node:process';
|
||||
import yargs from 'yargs';
|
||||
|
||||
import { notify } from '../src/alerts.js';
|
||||
import { knexOwner as knex } from '../src/knex.js';
|
||||
import redis from '../src/redis.js';
|
||||
|
||||
const { argv } = yargs(process.argv.slice(2))
|
||||
.option('scenes', {
|
||||
type: 'array',
|
||||
alias: ['scene-ids'],
|
||||
});
|
||||
|
||||
async function triggerNotify() {
|
||||
if (!argv.scenes.length) {
|
||||
throw new Error('Must specify at least one scene ID');
|
||||
}
|
||||
|
||||
await notify(argv.scenes, { spoofNew: true });
|
||||
|
||||
await knex.destroy();
|
||||
await redis.quit();
|
||||
}
|
||||
|
||||
triggerNotify();
|
||||
Reference in New Issue
Block a user