feat: version stdin command (closes #402)

This commit is contained in:
Isaac 2023-05-23 12:29:03 +01:00
parent f8450af34e
commit 1992ff641c
No known key found for this signature in database
GPG Key ID: 0DE40AE37BBA5C33

17
src/stdin/version.js Normal file
View File

@ -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);
}
};