discord-rpc | Java Wrapper of the Discord-RPC Library | Chat library
kandi X-RAY | discord-rpc Summary
kandi X-RAY | discord-rpc Summary
Java Wrapper of the Discord-RPC Library for Discord Rich Presence.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Load the DLL
- Copy file to output stream
- Gets operating system
- Determines if this is a mac
- Is the current operating system?
- Open the output stream
- Initialize the Discord - RPC
- Initialize the Discord - RPC command
- Clears the DiscordRichPres
- Returns the field order
- Register the command
- Register a Steam executable
- Response to Discord
- Do not callbacks
- Shutdown the server
- Update event handlers
- Update the DiscordRichPresence
- Get field order
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
You can use discord-rpc like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the discord-rpc component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
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