Closed ScuroNeko closed 5 years ago
I use follow code
import club.minnced.discord.rpc.*; public class Main { public static void main(String[] args) { DiscordRPC lib = DiscordRPC.INSTANCE; String applicationId = ""; String steamId = ""; DiscordEventHandlers handlers = new DiscordEventHandlers(); handlers.ready = (user) -> System.out.println("Ready!"); lib.Discord_Initialize(applicationId, handlers, true, steamId); DiscordRichPresence presence = new DiscordRichPresence(); presence.startTimestamp = System.currentTimeMillis() / 1000; // epoch second presence.details = "Testing RPC"; lib.Discord_UpdatePresence(presence); new Thread(() -> { while (!Thread.currentThread().isInterrupted()) { lib.Discord_RunCallbacks(); try { Thread.sleep(2000); } catch (InterruptedException ignored) {} } }, "RPC-Callback-Handler").start(); } }
and i get error in log Error in LSRegisterURL: -10811
Error in LSRegisterURL: -10811
This is a duplicate of https://github.com/discordapp/discord-rpc/issues/170
I use follow code
and i get error in log
Error in LSRegisterURL: -10811