From fbc2b8c6b919344ed5619d81b7221fa4ee795801 Mon Sep 17 00:00:00 2001 From: Isaac Date: Thu, 6 Oct 2022 14:39:37 +0100 Subject: [PATCH] stdin help --- src/stdin/commands.js | 5 +++++ src/stdin/help.js | 17 +++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 src/stdin/help.js diff --git a/src/stdin/commands.js b/src/stdin/commands.js index 29e4a71..7edb3fa 100644 --- a/src/stdin/commands.js +++ b/src/stdin/commands.js @@ -16,6 +16,11 @@ module.exports = class Commands extends StdinCommand { .catch(this.client.log.error); break; } + default: { + this.client.log.info('subcommands: \n' + [ + '> commands publish', + ].join('\n')); + } } } }; \ No newline at end of file diff --git a/src/stdin/help.js b/src/stdin/help.js new file mode 100644 index 0000000..109494c --- /dev/null +++ b/src/stdin/help.js @@ -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')); + } +}; \ No newline at end of file