From 2a7c2a7b86f47289e5495b7eee23db6239decce8 Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Mon, 16 Aug 2021 11:14:42 -0400 Subject: add exit listener --- src/listeners/other/exit.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/listeners/other/exit.ts diff --git a/src/listeners/other/exit.ts b/src/listeners/other/exit.ts new file mode 100644 index 0000000..d7c12f9 --- /dev/null +++ b/src/listeners/other/exit.ts @@ -0,0 +1,15 @@ +import { BushListener } from '@lib'; + +export default class ExitListener extends BushListener { + public constructor() { + super('exit', { + emitter: 'process', + event: 'exit' + }); + } + + public override async exec(code: number): Promise { + process.on('exit', () => {}); + void client.console.error('processExit', `Process ended with code <<${code}>>.`); + } +} -- cgit