28 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!
- ✅
Marked as resolved by staffA quick google search suggests the origin isn't even required. Try just dropping it
it is..
I intitally did try without passing origin
Did you see this part of the page?
If you're connecting to the RPC server from within a non-browser application (like a game), you just need to make sure that the origin is sent with the upgrade request when connecting to the WebSocket. For local testing, we recommend testing with an origin like https://localhost
let me try
but what if i am using broswer...
If you're connecting to the RPC server from within a browser, RPC origins are usually in the form SCHEME://HOST[:PORT], where SCHEME is typically https or http, HOST is your domain or ip, and PORT is the port of the webserver from which the user will be connecting (omitted for ports 80 and 443). For example, https://discord.com would be used if the user were connecting from https://discord.com/some/page/url
nope not working

yeah orgins are auto filled by browser, but i do need to set origin url in discord don't i ?
and where is that field ?
i can't find it anywhere
thats the main probelm
I mean RPC is old and deprecated so
The docs say they don't even approve new apps for it
then how am i suppose to set rich presence ?
lib is deprecated not rpc itself


what the actual heck...

I did mean the lib, my bad for not being clearer
But that does bring me back to "is origin even required"
yeah and Game SDK has been archived
both
websocket doesn't work and hasn't worked in like ever
caz it requires rpc origin field to be set
which i can't find anywhere in discord
no origin field is necessary. just switch to ipc
but i want to embed it in broswer
named pipes aren't supported in browser
impossible
no
its not

it's outdated
the documentation on the websocket info is completely false
really?
*spechless*
Is there any way for a broswer app to set rich presence ?
whats that
then premid should have used websocke to connect?
how else it can connect
but it runs in browser env
no way
i have read the rpc codes, it uses named pipe for ipc
and named pipe isn't supported by browser
well
anyways let me try
Browser environment
yeah
what that suppose to mean
no, a extension cannot access named pipes
thats what i found
i looked through entire internet
...
Browser environment means website btw
...
;-;
whatever

i take a look again, it is running in nodejs environment not browser environment
it is an electron app not a extension code, so they are using electron app as a bridge between extension and discord to sets the activity
so, they are like using extension to connect to the electron app and then that electron app sets the activity
I never said they can't...browser environment meant by a context where javascript runs, which is isolated by browser and they don't have access to low level things like named pipe thats what i mean from beginning
argument is waste, so lets forget it
An extension is still JavaScript executed in a browser environment
yeah
...
was an waste of time
ig