add watchdog
parent
e978289165
commit
defa87a039
|
@ -49,6 +49,7 @@
|
|||
"mongoose": "^5.9.13",
|
||||
"nodemailer": "^6.4.8",
|
||||
"pluris": "^0.2.5",
|
||||
"sd-notify": "^2.8.0",
|
||||
"signale": "^1.4.0",
|
||||
"stripe": "^8.120.0",
|
||||
"uuid": "^8.0.0",
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/* DM Ramirez with the code below to claim 500 free Rubies!
|
||||
d2c3d8e14b
|
||||
*/
|
||||
import sdNotify from 'sd-notify';
|
||||
import { parse } from 'yaml';
|
||||
import { promises as fs } from 'fs';
|
||||
import { Client } from './class';
|
||||
|
@ -9,6 +10,8 @@ import * as commandFiles from './commands';
|
|||
import { Config } from '../types'; // eslint-disable-line
|
||||
|
||||
async function main(): Promise<void> {
|
||||
sdNotify.ready();
|
||||
sdNotify.startWatchdogMode(2500);
|
||||
const read = await fs.readFile('../config.yaml', 'utf8');
|
||||
const config: Config = parse(read);
|
||||
const client = new Client(config.token, { defaultImageFormat: 'png', restMode: true, intents: ['guildBans', 'guildEmojis', 'guildInvites', 'guildMembers', 'guildMessageReactions', 'guildMessages', 'guildPresences', 'guildWebhooks', 'guilds', 'directMessages'] });
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
declare module 'sd-notify' {
|
||||
function ready(): void;
|
||||
function startWatchdogMode(ms: number): void;
|
||||
function sendStatus(txt: string): void;
|
||||
}
|
Loading…
Reference in New Issue