Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DiscordRPC lib = DiscordRPC.INSTANCE;
- String id = "<VOTRE CLIENT-ID>";
- String steamID = "";
- DiscordEventHandlers handlers = new DiscordEventHandlers();
- lib.Discord_Initialize(id, handlers, true, steamID);
- DiscordRichPresence presence = new DiscordRichPresence();
- presence.startTimestamp = System.currentTimeMillis() / 1000;
- presence.details = "<VOTRE DETAILS>";
- presence.state = "<VOTRE STATE>";
- lib.Discord_UpdatePresence(presence);
- new Thread(() -> {
- while (!Thread.currentThread().isInterrupted()){
- lib.Discord_RunCallbacks();
- try {
- Thread.sleep(2000);
- }catch (InterruptedException ignored){}
- }
- }, "RPC-Callback-Handler").start();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement