stdin help

This commit is contained in:
Isaac 2022-10-06 14:39:37 +01:00
parent 507e963efc
commit fbc2b8c6b9
No known key found for this signature in database
GPG Key ID: 0DE40AE37BBA5C33
2 changed files with 22 additions and 0 deletions

View File

@ -16,6 +16,11 @@ module.exports = class Commands extends StdinCommand {
.catch(this.client.log.error); .catch(this.client.log.error);
break; break;
} }
default: {
this.client.log.info('subcommands: \n' + [
'> commands publish',
].join('\n'));
}
} }
} }
}; };

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

@ -0,0 +1,17 @@
const { StdinCommand } = require('@eartharoid/dbf');
const { homepage } = require('../../package.json');
module.exports = class extends StdinCommand {
constructor(client, options) {
super(client, {
...options,
id: 'help',
});
}
async run() {
this.client.log.info('Documentation:', homepage);
this.client.log.info('Support: https://lnk.earth/discord');
this.client.log.info('stdin commands:\n' + this.client.stdin.components.map(c => `> ${c.id}`).join('\n'));
}
};