app crashed when discord isn't opened
- Dominant language
- Java
- Stars
- 149
- Forks
- 60
- PR merge metrics
- No merged PRs in 30d
Description
How to fix it that the app crashes when discord isn't opened?
`IPCClient client = new IPCClient(/*ID not for you*/);
client.setListener(new IPCListener() {
private Minecraft mc;
@Override
public void onReady(IPCClient client) {
RichPresence.Builder builder = new RichPresence.Builder();
builder.setState("Versie: " + getMinecraft().getVersion())
.setDetails("Naam: " + getMinecraft().getSession().getUsername())
.setStartTimestamp(OffsetDateTime.now())
.setLargeImage("monkey-logo", "Client Side Anicheat");
client.sendRichPresence(builder.build());
}
});
try {
client.connect();
} catch (NoDiscordClientException e) {
e.printStackTrace();
}`
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the IPCClient connection code shown in the issue, especially client.connect() and NoDiscordClientException. Reproduce the problem by launching the app without Discord and inspect the exception path. Done means the app no longer crashes when Discord is unavailable, while the existing behavior remains when Discord is running.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100