{"_id":"57a7ee81ceb1c717005f0070","category":{"_id":"57858e1b8a711d2000d1252b","version":"57858bff9e80c32200234f4f","project":"57858bff9e80c32200234f4c","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-07-13T00:40:59.463Z","from_sync":false,"order":1,"slug":"managers","title":"Core Managers"},"githubsync":"","user":"57858823fc4a0f2200f02f01","version":{"_id":"57858bff9e80c32200234f4f","__v":3,"project":"57858bff9e80c32200234f4c","createdAt":"2016-07-13T00:31:59.708Z","releaseDate":"2016-07-13T00:31:59.708Z","categories":["57858bff9e80c32200234f50","57858e1b8a711d2000d1252b","5785a2bf2eca4e0e002b4d67"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"Stable. I Hope.","version_clean":"0.3.0","version":"0.3.00"},"__v":0,"project":"57858bff9e80c32200234f4c","updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-08-08T02:29:21.007Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"settings":"","results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":999,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Info\"\n}\n[/block]\n**Name** - `HelpManager`\n**Options** :\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"key\",\n    \"h-1\": \"type\",\n    \"h-2\": \"desc\",\n    \"0-0\": \"\",\n    \"0-1\": \"\",\n    \"0-2\": \"\"\n  },\n  \"cols\": 3,\n  \"rows\": 1\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Commands\"\n}\n[/block]\nThese are the default commands include.\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Command\",\n    \"h-1\": \"Run\",\n    \"h-2\": \"Context\",\n    \"h-3\": \"Desc\",\n    \"h-4\": \"Usage\",\n    \"0-0\": \"help\",\n    \"0-1\": \"cmdHelp\",\n    \"0-2\": \"HelpManager\",\n    \"0-3\": \"Displays Help.\",\n    \"0-4\": \"help\"\n  },\n  \"cols\": 5,\n  \"rows\": 1\n}\n[/block]\nThis Function is used internally to AudioPlayer for the commands playFile and stopPlayinghttps://dash.readme.io/project/disnode/v0.3.00/docs/audioplayer\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Config\"\n}\n[/block]\nDefault Config Params\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"name\",\n    \"h-1\": \"type\",\n    \"h-2\": \"desc\",\n    \"0-0\": \"commands\",\n    \"0-1\": \"Array<CommandObjects>\",\n    \"0-2\": \"Default Commands\"\n  },\n  \"cols\": 3,\n  \"rows\": 1\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Source Code\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"\\\"use strict\\\"\\n\\nclass HelpManager{\\n  constructor(options){\\n\\n    this.defaultConfig = {\\n      commands:[\\n        {\\n          \\\"cmd\\\": \\\"help\\\",\\n          \\\"context\\\": \\\"HelpManager\\\",\\n          \\\"run\\\": \\\"cmdHelp\\\",\\n          \\\"desc\\\": \\\"Displays Help.\\\",\\n          \\\"usage\\\": \\\"help\\\"\\n        }\\n      ]\\n    }\\n\\n    var self = this;\\n    //Created Class Varables for Disnode and Options\\n    self.disnode = options.disnode;\\n    self.options = options;\\n    // Loads Config.\\n    self.config = self.disnode.config.TestManager;\\n    //Defaults if saying isn't provided\\n\\n  }\\n\\n  cmdHelp(parsedMsg){\\n    var self = this;\\n\\n    var SendString = \\\"``` === HELP === \\\\n\\\";\\n    for (var i = 0; i < self.disnode.CommandHandler.list.length; i++) {\\n      var cmd = self.disnode.CommandHandler.list[i];\\n      //cmd.cmd, cmd.desc,cmd.usage\\n      SendString = SendString + \\\"-\\\"+self.disnode.CommandHandler.prefix+cmd.cmd+\\\" : \\\"+cmd.desc+\\\" - \\\" + self.disnode.CommandHandler.prefix+ cmd.usage + \\\"\\\\n\\\";\\n      SendString = SendString + \\\"\\\\n\\\";\\n    }\\n    SendString = SendString + \\\"```\\\";\\n    self.disnode.bot.sendMessage(parsedMsg.msg.channel, SendString);\\n  }\\n\\n}\\nmodule.exports = HelpManager;\\n\\n\",\n      \"language\": \"javascript\",\n      \"name\": \"ManagerSource\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"helpmanager","type":"basic","title":"HelpManager"}
[block:api-header] { "type": "basic", "title": "Info" } [/block] **Name** - `HelpManager` **Options** : [block:parameters] { "data": { "h-0": "key", "h-1": "type", "h-2": "desc", "0-0": "", "0-1": "", "0-2": "" }, "cols": 3, "rows": 1 } [/block] [block:api-header] { "type": "basic", "title": "Commands" } [/block] These are the default commands include. [block:parameters] { "data": { "h-0": "Command", "h-1": "Run", "h-2": "Context", "h-3": "Desc", "h-4": "Usage", "0-0": "help", "0-1": "cmdHelp", "0-2": "HelpManager", "0-3": "Displays Help.", "0-4": "help" }, "cols": 5, "rows": 1 } [/block] This Function is used internally to AudioPlayer for the commands playFile and stopPlayinghttps://dash.readme.io/project/disnode/v0.3.00/docs/audioplayer [block:api-header] { "type": "basic", "title": "Config" } [/block] Default Config Params [block:parameters] { "data": { "h-0": "name", "h-1": "type", "h-2": "desc", "0-0": "commands", "0-1": "Array<CommandObjects>", "0-2": "Default Commands" }, "cols": 3, "rows": 1 } [/block] [block:api-header] { "type": "basic", "title": "Source Code" } [/block] [block:code] { "codes": [ { "code": "\"use strict\"\n\nclass HelpManager{\n constructor(options){\n\n this.defaultConfig = {\n commands:[\n {\n \"cmd\": \"help\",\n \"context\": \"HelpManager\",\n \"run\": \"cmdHelp\",\n \"desc\": \"Displays Help.\",\n \"usage\": \"help\"\n }\n ]\n }\n\n var self = this;\n //Created Class Varables for Disnode and Options\n self.disnode = options.disnode;\n self.options = options;\n // Loads Config.\n self.config = self.disnode.config.TestManager;\n //Defaults if saying isn't provided\n\n }\n\n cmdHelp(parsedMsg){\n var self = this;\n\n var SendString = \"``` === HELP === \\n\";\n for (var i = 0; i < self.disnode.CommandHandler.list.length; i++) {\n var cmd = self.disnode.CommandHandler.list[i];\n //cmd.cmd, cmd.desc,cmd.usage\n SendString = SendString + \"-\"+self.disnode.CommandHandler.prefix+cmd.cmd+\" : \"+cmd.desc+\" - \" + self.disnode.CommandHandler.prefix+ cmd.usage + \"\\n\";\n SendString = SendString + \"\\n\";\n }\n SendString = SendString + \"```\";\n self.disnode.bot.sendMessage(parsedMsg.msg.channel, SendString);\n }\n\n}\nmodule.exports = HelpManager;\n\n", "language": "javascript", "name": "ManagerSource" } ] } [/block]