From 1992ff641cde3e4845540f93a68de45e9f180b3e Mon Sep 17 00:00:00 2001 From: Isaac Date: Tue, 23 May 2023 12:29:03 +0100 Subject: [PATCH] feat: `version` stdin command (closes #402) --- src/stdin/version.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/stdin/version.js diff --git a/src/stdin/version.js b/src/stdin/version.js new file mode 100644 index 0000000..d857b72 --- /dev/null +++ b/src/stdin/version.js @@ -0,0 +1,17 @@ +const { StdinCommand } = require('@eartharoid/dbf'); +const { version } = require('../../package.json'); +const checkForUpdates = require('../lib/updates'); + +module.exports = class extends StdinCommand { + constructor(client, options) { + super(client, { + ...options, + id: 'version', + }); + } + + async run() { + this.client.log.info('Current version:', version); + checkForUpdates(this.client); + } +};