title: Discord.js with Node.js connect to client fails but no errors
body: <p>I have the Discord.JS module in nodeJS</p>
  
  <pre><code>$ npm install --save discord.js
  </code></pre>
  
  <p>But when I am ever trying to connect to a user with it, it fails.</p>
  
  <p>This is my package.json</p>
  
  <pre><code>{
    "name": "discord-bot",
    "version": "0.0.1",
    "description": "A Discord Bot that comes with a lot of cool commands, music player and a betting game!",
    "main": "app/app.js",
    "scripts": {
      "start": "electron ."
    },
    "keywords": [
      "bot",
      "discord",
      "music",
      "betting-bot"
    ],
    "author": "Richard Olsen Sandberg",
    "license": "MIT",
    "devDependencies": {
      "electron": "^1.4.15"
    },
    "dependencies": {
      "discord.js": "^11.0.0"
    }
  }
  </code></pre>
  
  <p>This is my code for <code>app/app.js</code></p>
  
  <pre><code>var ClassNode     = require ( __dirname + '/web/js/classnodes.js' ), /* This is something I have made to detect class names and make more beautiful outputs */
      Discord       = require ( 'discord.js' )                       , /* This is the offical Discord.JS library                                              */
      Client        = new Discord.Client (  )                        , /* This is a new instance of a Client from the Discord module                          */
      Electron      = require ( 'electron' )                         , /* This is to create applications that uses html, css, js, etc inside a chrome window  */
      BrowserWindow = Electron.BrowserWindow                         , /* This is the class that creates the Chrome Window                                    */
      app           = Electron.app                                   , /* This is the core off Electron                                                       */
      ipc           = Electron.ipcMain                               ; /* Send messages through windows                                                       */
  
  /*****************************************/
  /* I will not show content of Electron   */
  /* stuff except from the login part to   */
  /* make the question shorter             */
  /*****************************************/
  
  
  
  ipc.on ( 'login-attempt', ( event, args ) =&gt; {
    console.warning ( ClassNode.className + 'New sign in attempt triggered!' );
  
    if ( typeof args !== 'object' || args.username == undefined || args.password == undefined ) {
      console.error ( ClassNode.className + 'Invalid sign in attempt!' );
      event.sender.send ( 'login-attempt-error', ClassNode.className + 'Invalid request!' );
      return;
    }
  
    Client.login ( args.username, args.password, ( error, token ) =&gt; {
      if ( error ) {
        console.error ( ClassNode.className + 'Login attempt failed : ' + error );
        event.sender.send ( 'login-attempt-error', ClassNode.className + 'Login attempt failed : ' + error );
      } else {
        console.log ( ClassNode.className + 'Successfully created a connection!' );
        console.log ( ClassNode.className + 'Token : ' + token );
      }
    } );
  
  } );
  </code></pre>
  
  <p>Now assume that the browser window sent <code>ipc.send('login-attempt', { username: 'discord@example.com', password: '123abc' })</code></p>
  
  <p>Output:</p>
  
  <blockquote>
    <p>Electron::ipcMain | New sign in attempt triggered!</p>
  </blockquote>
  
  <p>Which means it never executed the Client.login function.</p>
  
  <p>Why does it not do that and how do I fix it?</p>