const { Command } = require('discord.js-commando')

module.exports = class GetCodeCommand extends Command {
  constructor (client) {
    super(client, {
      name: 'getcommand',
      memberName: 'getcommand',
      group: 'utility',
      description: 'Shows a command from the bot.',
      args: [
        {
          key: 'command',
          prompt: 'What command would you like to view?',
          type: 'command'
        }
      ]
    })
  }

  async run (message, args) {
    let command = args.command
    let code = require(`${process.cwd()}\\commands\\${command.groupID}\\${command.name}.js`).toString()
    code = clean(code)
    for (let i = 0; i < code.length; i += 1950) {
      message.say(`\`\`\`js\n${code.substring(i, i + 1950)}\n\`\`\``)
    }
  }
}

/**
 * Adds a nospace character to embed breaking text.
 * @param {string} text The text to clean.
 * @return {string} The text after it was cleaned.
 */
var clean = (text) => {
  if (typeof (text) === 'string') {
    return text
      .replace(/`/g, '`' + String.fromCharCode(8203))
      .replace(/@/g, '@' + String.fromCharCode(8203))
      .replace(/#/g, '#' + String.fromCharCode(8203))
  } else {
    return text
  }
}

@@ -44,16 +44,42 @@
 mando')%0D
+%0Aconst os = require('os')%0D
 %0A%0D%0Amodul
@@ -524,19 +524,19 @@
  %7B%0D%0A    
-let
+var
  command
@@ -556,19 +556,76 @@
 nd%0D%0A    
-let
+var code%0D%0A    if (os.platform() === 'win32') %7B%0D%0A      code =
  code = 
@@ -714,16 +714,144 @@
 ring()%0D%0A
+    %7D else %7B%0D%0A      code = code = require(%60$%7Bprocess.cwd()%7D/commands/$%7Bcommand.groupID%7D/$%7Bcommand.name%7D.js%60).toString()%0D%0A    %7D%0D%0A
     code

Make getcode cross platform.