Skip to content

Commit

Permalink
added small example to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jagrosh committed Nov 30, 2017
1 parent 8adcee6 commit 9c255a6
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,32 @@

Connect locally to the Discord client using IPC for a subset of RPC features like Rich Presence and Activity Join/Spectate

# Disclaimer

This is still heavily WIP. Expect errors, unsupported operating systems, and missing features.
# Features

- Setting Rich Presence
- Listen for Join, Spectate, and Join-Request events
- Detect and specify priority for client build (Stable, PTB, Canary)
- 100% Java


# Example

Quick example, assuming you already have a GUI application
```java
IPCClient client = new IPCClient(345229890980937739L);
client.setListener(new IPCListener(){
@Override
public void onReady(IPCClient client)
{
client.sendRichPresence(new RichPresence("West of House", "Frustration level: Over 9000",
OffsetDateTime.now(), null, "canary-large", null, "ptb-small", null, "party1234",
1, 6, "xyzzy", "join", "look", false));
}
});
client.connect();
```
Additional examples will be available soon.


# Official Discord-RPC Bindings
Expand Down

0 comments on commit 9c255a6

Please sign in to comment.