const Discord = require('discord.js')
const Confax = require('../bot.js')
const config = require('../config.json')

Confax.registerCommand('advancedhelp', 'default', (message, bot) => {
  let helpMsg = ''
  let commands = Confax.commands

  for (let loopCmdType in commands) {
    helpMsg += '**~~------~~** __' + loopCmdType.toUpperCase() + ' COMMANDS__ **~~------~~**'
    for (let loopCmd in commands[loopCmdType]) {
      helpMsg += '```\nCommand: ' + loopCmd

      if (commands[loopCmdType][loopCmd].aliases.length > 0) {
        helpMsg += '\nAliases: ' + commands[loopCmdType][loopCmd].aliases.join(', ')
      } else {
        helpMsg += '\nAliases: N/A'
      }

      if (commands[loopCmdType][loopCmd].description) {
        helpMsg += '\nDescription: ' + commands[loopCmdType][loopCmd].description
      } else {
        helpMsg += '\nDescription: N/A'
      }

      if (commands[loopCmdType][loopCmd].usage) {
        helpMsg += '\nUsage: ' + commands[loopCmdType][loopCmd].usage
      } else {
        helpMsg += '\nUsage: N/A'
      }

      helpMsg += '\n```'
    }
  }

  message.author.send('**Advanced Help**\n\n' +
  'All commands are prefixed with: `' + config.prefix + '` and suffixed with: `' + config.suffix + '`\n\n' +
  helpMsg, { split: true })
  return 'I sent you the advanced help list as a DM!'
}, [], 'List advanced information about every registered command', '[]')

@@ -1,42 +1,4 @@
-const Discord = require('discord.js')%0A
 cons
@@ -158,17 +158,105 @@
 pMsg = '
-'
+**Advanced Help**%5Cn%5Cn' +%0A  'All commands are prefixed with: %60' + config.prefix + '%60%5Cn%5Cn'%0A
 %0A  let c
@@ -1129,174 +1129,139 @@
     
-%7D%0A  %7D%0A%0A  message.author.send('**Advanced Help**%5Cn%5Cn' +%0A  'All commands are prefixed with: %60' + config.prefix + '%60 and suffixed with: %60' + config.suffix + '%60%5Cn%5Cn' +%0A  
+  if (helpMsg.length %3E= 1900) %7B%0A        message.author.send(helpMsg)%0A        helpMsg = ''%0A      %7D%0A    %7D%0A  %7D%0A%0A  message.author.send(
 help

Fix advancedhelp command