aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/commands/core/showcase.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/commands/core/showcase.js')
-rw-r--r--server/src/commands/core/showcase.js21
1 files changed, 13 insertions, 8 deletions
diff --git a/server/src/commands/core/showcase.js b/server/src/commands/core/showcase.js
index 5d15ea2..5eca4a2 100644
--- a/server/src/commands/core/showcase.js
+++ b/server/src/commands/core/showcase.js
@@ -1,5 +1,5 @@
/*
-
+ Description: This is a template module that should not be on prod
*/
'use strict';
@@ -14,21 +14,26 @@ const createReply = (echoInput) => {
return `You want me to echo: ${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()` is required and will always be passed (core, server, socket, data)
+
+ be sure it's async too
+ this is the main function that will run when called
+*/
exports.run = async (core, server, socket, data) => {
server.reply({
cmd: 'info',
- text: `SHOWCASE MODULE: ${core.showcase} - ${this.createReply(data.echo)}`
+ text: `SHOWCASE MODULE: ${core.showcase} - ${createReply(data.echo)}`
}, socket);
};
-// `exports.init()` is optional, and will only be run when the module is loaded into memory
-// it will always be passed a reference to the global core class
-// note: this will fire again if a reload is issued, keep that in mind
+/*
+ `exports.init()` is optional, and will only be run when the module is loaded into memory
+ it will always be passed a reference to the global core class
+ note: this will fire again if a reload is issued, keep that in mind
+*/
exports.init = (core) => {
if (typeof core.showcase === 'undefined') {
core.showcase = 'init is a handy place to put global data by assigning it to `core`';