title: I have an error for discord.js rpc! Can someone please help me?
body: <p>This is my error:</p>
  <pre><code>(node:42087) UnhandledPromiseRejectionWarning: Error: Could not connect
      at Socket.onerror (/Users/vinesh/RPC/node_modules/discord-rpc/src/transports/ipc.js:32:16)
      at Object.onceWrapper (events.js:422:26)
      at Socket.emit (events.js:315:20)
      at emitErrorNT (internal/streams/destroy.js:106:8)
      at emitErrorCloseNT (internal/streams/destroy.js:74:3)
      at processTicksAndRejections (internal/process/task_queues.js:80:21)
  (Use `node --trace-warnings ...` to show where the warning was created)
  (node:42087) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
  (node:42087) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
  </code></pre>
  <p>My code:</p>
  <pre><code>const RPC = require('discord-rpc');
  const client = new RPC.Client({ transport: 'ipc' });
  client.on('ready', () =&gt;
  {
      client.request('SET_ACTIVITY', {
          pid: process.pid,
          activity: {
              assets: {
                  large_image: 'Coding'
              },
              details: 'Coding',
              buttons: [
                  { label: 'Emperor', url: 'https://dsc.gg/invite-emperor' },
                  { label: 'https://dsc.gg/invite-emperor', url: 'https://dsc.gg/invite-emperor' }
              ]
          }
      });
      console.log('started!');
  });
  client.login({ clientId: 'My_ID' });
  </code></pre>
  <p>How do I fix this? Is it because the code is old? I don't know why it does that. I did <code>npm init -y</code>, <code>npm install discord</code>, and <code>npm install discord-rpc</code>.</p>