From bae6af96f7795ec0753a2da708c13fc5adfd986d Mon Sep 17 00:00:00 2001 From: Isaac Date: Sun, 4 Sep 2022 21:08:36 +0100 Subject: [PATCH] Add exit stdin command --- src/stdin/exit.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/stdin/exit.js diff --git a/src/stdin/exit.js b/src/stdin/exit.js new file mode 100644 index 0000000..e58317e --- /dev/null +++ b/src/stdin/exit.js @@ -0,0 +1,15 @@ +const { StdinCommand } = require('@eartharoid/dbf'); + +module.exports = class extends StdinCommand { + constructor(client, options) { + super(client, { + ...options, + id: 'exit', + }); + } + + async run() { + this.client.log.info('Exiting'); + process.exit(); + } +}; \ No newline at end of file