discordjs / RPC

A simple RPC client for Discord
MIT License
474 stars 192 forks source link

Reconnect Error #58

Closed 3l0w closed 5 years ago

3l0w commented 5 years ago

When a user don't have discord open RPC don't start but If want to Reconnect like this :

 rpc.connect(clientId).catch((data) => {
            console.log("Discord RPC Error: " + data.toString())
        });

or:

rpc.login({clientId:clientId}).catch((data) => {
            console.log("Discord RPC Error: " + data.toString())
});

I got:


Error: Could not connect
    at Socket.onerror (H:\dev\fl0wrpc\node_modules\discord-rpc\src\transports\IPC.js:32:16)
    at Object.onceWrapper (events.js:315:30)
    at emitOne (events.js:116:13)
    at Socket.emit (events.js:211:7)
    at emitErrorNT (internal/streams/destroy.js:64:8)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)```