TypeError: setTimeout is not a function using error when using discord-rpc in electron
Hi! I'm trying to use https://github.com/discordjs/RPC#readme, but have gotten stuck at a specific part.
When i run my standalone test for my RPC interaction file, my code works properly. (seen below)
However, when I use it in electron by importing it, i get this error:
contextisolation for discord-rpc, as i get error:
TypeError: setTimeout is not a function at eval (client.js:100:23)
Is there some sort of documentation on why an error on this sort happens? And if not, could please i get some assistance in fixing it?
tysm in advanceGitHub
GitHub - discordjs/RPC: A simple RPC client for Discord
A simple RPC client for Discord. Contribute to discordjs/RPC development by creating an account on GitHub.
2 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 OPNode Version: v22.13.
Full Stack Trace:
;~;
is there a way to use it in electron or am i gonna have to use some weird solution...?
solved
i decided to do it myself without library