Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

469
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda