aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorneelkamath <neelkamath@protonmail.com>2018-05-12 11:19:56 +0200
committerneelkamath <neelkamath@protonmail.com>2018-05-12 11:19:56 +0200
commit5b3322ebba246c3d3581e3e51e3c29671d506a20 (patch)
treeba0ef7ae2485f1a8462f32f65c9c4a8290d16578 /server
parentRemove unused object fields (diff)
downloadhackchat-5b3322ebba246c3d3581e3e51e3c29671d506a20.tar.gz
hackchat-5b3322ebba246c3d3581e3e51e3c29671d506a20.zip
Enhance READM.md
Diffstat (limited to 'server')
-rw-r--r--server/src/commands/core/showcase.js49
1 files changed, 0 insertions, 49 deletions
diff --git a/server/src/commands/core/showcase.js b/server/src/commands/core/showcase.js
deleted file mode 100644
index 1f2cdd9..0000000
--- a/server/src/commands/core/showcase.js
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- Description: This is a template module that should not be on prod
-*/
-
-// you can require() modules here
-
-// this function will only be only in the scope of the module
-const createReply = (echoInput) => {
- if (echoInput.length > 100)
- echoInput = 'HOW ABOUT NO?';
-
- return `You want me to echo: ${echoInput}?`
-};
-
-/*
- `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} - ${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 = (core) => {
- if (typeof core.showcase === 'undefined') {
- core.showcase = 'init is a handy place to put global data by assigning it to `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']
-};