From 28fd9fbfd24d83e4b8f56a0a8cb6df8eea270656 Mon Sep 17 00:00:00 2001 From: MSFTserver Date: Wed, 1 Nov 2017 11:36:19 -0700 Subject: [PATCH 1/2] add more helping text to example --- bot/modules/example.js | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/bot/modules/example.js b/bot/modules/example.js index e9fc41a..0295b45 100644 --- a/bot/modules/example.js +++ b/bot/modules/example.js @@ -1,22 +1,24 @@ /* -exports.commands = [ - "demo" // command that is in this file, every command needs it own export as shown below -] +// Example #1 Command(use this to make your Commands with triggers like !demo) + exports.commands = [ + "demo" // command name that will be used for next lines of code below + ] -exports.custom = [ - "initFunction" -] + exports.demo = { + usage: "", //command usage like !demo <@username>, exclude !demo + description: 'description of command', //the description of command for !help command + process: function(bot,msg,suffix){ + // Here the bot,msg and suffix is avaible, this function can be async if needed. + } + } -exports.demo = { - usage: "", - description: 'description of command', - process: function(bot,msg,suffix){ - // Here the bot,msg and suffix is avaible, this function can be async if needed. - } -} +// Example #2 Function(use this to make your Functions that dont need trigger words unlike !demo) + exports.custom = [ + "myFunction" //change this to your function name + ] -exports.initFunction = function(bot) { - // Other functions that needs to be ran once on bootup! - // For example a timed function and or some init stuff.. -} -*/ \ No newline at end of file + exports.myFunction = function(bot) { + // Other functions that needs to be ran once on bootup! + // For example a timed function and or some init stuff.. + } +*/ From 6059b2df1972ba2d68bee426bda8db820baab884 Mon Sep 17 00:00:00 2001 From: MSFTserver Date: Wed, 1 Nov 2017 16:32:45 -0700 Subject: [PATCH 2/2] Update example.js --- bot/modules/example.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot/modules/example.js b/bot/modules/example.js index 0295b45..2f57332 100644 --- a/bot/modules/example.js +++ b/bot/modules/example.js @@ -8,7 +8,7 @@ usage: "", //command usage like !demo <@username>, exclude !demo description: 'description of command', //the description of command for !help command process: function(bot,msg,suffix){ - // Here the bot,msg and suffix is avaible, this function can be async if needed. + // Here the bot,msg and suffix is available, this function can be async if needed. } } @@ -18,7 +18,7 @@ ] exports.myFunction = function(bot) { - // Other functions that needs to be ran once on bootup! + // Other functions that need to be ran once on bootup! // For example a timed function and or some init stuff.. } */