devsnek / discord-rich-presence

Discord RPC but only the rich presence part
122 stars 16 forks source link

Could not connect Node.JS #28

Closed loockeeer closed 3 years ago

loockeeer commented 3 years ago

Hi ! I was planning to use it in some Node.JS project, but when I tested it, I had this strange error :

Error: Could not connect

It's strange because first I have discord installed and running on my computer, and then, I never had this issue before :thinking: My computer is running on Manjaro Linux with i3wm as a window manager but I don't think that could lead to this issue...

(My code, pretty simple)

const client = require('discord-rich-presence')('443366917483266059');

client.updatePresence({
  state: 'slithering',
  details: '🐍',
  startTimestamp: Date.now(),
  endTimestamp: Date.now() + 1337,
  instance: true,
});
Ximaz commented 3 years ago

Same.

DylanD16 commented 3 years ago

Run client.setActivity instead.

loockeeer commented 3 years ago

Thanks !