discordjs / RPC

A simple RPC client for Discord

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Socket error

kernelwernel opened this issue · comments

For some reason, the code works on my host machine but when I try to make it into a docker container, it gives me this error:

Error: Could not connect
    at Socket.onerror (/root/trollge/node_modules/discord-rpc/src/transports/ipc.js:32:16)
    at Object.onceWrapper (events.js:421:26)
    at Socket.emit (events.js:314:20)
    at emitErrorNT (internal/streams/destroy.js:92:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)

I tried to run this on my VPS and the same thing happened. Any help?

Same error but trying in Bun

import {register, Client} from "discord-rpc"
register(':D');
const rpc = new Client({transport: 'ipc'});
rpc.on('ready', () => {
    console.log('Client is ready');
})
rpc.login({clientId: ":D});

Enviroment Details

DiscordRPC ^4.0.1
Bun 1.0.22
Discord installed with snap
Running in KDE Neon (Ubuntu)