Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

476
Vistas
discord RPC error when i try to run the code

when i try to run the code i get this error. i wrote this code with the help of a tutorial in youtube but i don't know what is the mistake i made in this.

Error: Could not connect at Socket.onerror (/home/runner/Toshiro/node_modules/discord-rpc/src/transports/ipc.js:32:16) at Object.onceWrapper (node:events:510:26) at Socket.emit (node:events:390:28) at Socket.emit (node:domain:475:12) at emitErrorNT (node:internal/streams/destroy:157:8) at emitErrorCloseNT (node:internal/streams/destroy:122:3)

my code:

const clientId = "960430276532645888"
const DiscordRPC = require("discord-rpc");
const RPC = new DiscordRPC.Client({ transport: "ipc" });

DiscordRPC.register(clientId);

async function setActivity() {
  if (!RPC) return;
  RPC.setActivity({
    details: `Reading`,
    state: `all subjects`,
    startTimestamp: Date.now(),
    largeImageKey: `books`,
    largeImageText: `books`,
    smallImageKey: `verified`,
    smallImageText: `verified`,
    instance: false,
    buttons: [
      {
        label: `Join Me :)`,
        url: `https://www.sanfransentinel.com/combine-study.html`,

      },
    ]
  });
};

RPC.on('ready', async () => {
  setActivity();

  setInterval(() => {
    setActivity();
  }, 15 * 1000);
})

RPC.login({ clientId }).catch(err => console.error(err));

how can i solve this problem

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Take a read through here: https://github.com/iCrawl/discord-vscode/issues/85.

It looks like it may just be the permissions on your computer.

Try running the code editor as admin and make sure Discord isn't running admin. How to run an application as admin.

If you are not running it locally it wont work, the library connects to your local running discord client. If you host it on a different machine it cannot connect anymore.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda