diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-08-16 11:14:42 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-08-16 11:14:42 -0400 |
commit | 2a7c2a7b86f47289e5495b7eee23db6239decce8 (patch) | |
tree | 1e9af344d23484f5ad2ebd359e74d5dafc518419 | |
parent | 09dd9f3923ac23e1a899aa7ccaf4bb0a2058b2fa (diff) | |
download | tanzanite-2a7c2a7b86f47289e5495b7eee23db6239decce8.tar.gz tanzanite-2a7c2a7b86f47289e5495b7eee23db6239decce8.tar.bz2 tanzanite-2a7c2a7b86f47289e5495b7eee23db6239decce8.zip |
add exit listener
-rw-r--r-- | src/listeners/other/exit.ts | 15 |
1 files changed, 15 insertions, 0 deletions
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<void> { + process.on('exit', () => {}); + void client.console.error('processExit', `Process ended with code <<${code}>>.`); + } +} |