From 7d8220d838f82f7ad1ffedbcbd3b955aef6d71a2 Mon Sep 17 00:00:00 2001 From: marzavec Date: Sat, 10 Mar 2018 22:41:17 -0800 Subject: stabilized modules and server cmd field --- server/src/commands/core/showcase.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'server/src/commands/core/showcase.js') diff --git a/server/src/commands/core/showcase.js b/server/src/commands/core/showcase.js index aaa474c..5d15ea2 100644 --- a/server/src/commands/core/showcase.js +++ b/server/src/commands/core/showcase.js @@ -16,6 +16,7 @@ const createReply = (echoInput) => { // `exports.run()` is required and will always be passed (core, server, socket, data) // be sure it's asyn too +// this is the main function exports.run = async (core, server, socket, data) => { server.reply({ @@ -35,12 +36,13 @@ exports.init = (core) => { } // optional, if `data.echo` is missing `exports.run()` will never be called & the user will be alerted +// remember; this will only verify that the data is not undefined, not the type of data exports.requiredData = ['echo']; // optional parameters are marked, all others are required exports.info = { name: 'showcase', // actual command name aliases: ['templateModule'], // optional, an array of other names this module can be executed by - usage: 'showcase {echo}', // used for help output + usage: 'showcase {echo}', // used for help output, can be ommited if no parameters are required description: 'Simple command module template & info' // used for help output }; -- cgit v1.2.1