discord-rpc | A discord client to display a button status | Chat library
kandi X-RAY | discord-rpc Summary
kandi X-RAY | discord-rpc Summary
A way of showing a button status on discord.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of discord-rpc
discord-rpc Key Features
discord-rpc Examples and Code Snippets
Community Discussions
Trending Discussions on discord-rpc
QUESTION
I had a issue with my app shutting down when discord wasn't launched on desktop because of RPC.
...ANSWER
Answered 2021-Sep-16 at 01:39Now when I added the catch block it doesn't shut down when it cannot connect but it shows a pretty long error to the user, which I would like to hide or replace with a smaller console log like "RPC offline" or something
You mean you want to do something like .catch(() => console.log("RPC Offline"))
?
ofcourse i tried to use normal
try-catch
and only .catch(error) instead of.catch(console.error)
but that doesn't seem to catch the unsuccessful connection and just shuts down the script again.
Because it's a promise and you can't handle rejections via try-catch
unless you are await
ing
QUESTION
I'm only importing discord-rpc and only have main.ts
. Also using rollup plugins typscript and node-resolve.
main.ts
import:
ANSWER
Answered 2020-Nov-06 at 17:26Ok so I solved the problem!
I had to move a few things around:
rollup.config.js
:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install discord-rpc
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page