Skip to content
This repository has been archived by the owner on Oct 23, 2021. It is now read-only.

Error in LSRegisterURL: -10811 #33

Closed
ScuroNeko opened this issue Dec 17, 2018 · 1 comment
Closed

Error in LSRegisterURL: -10811 #33

ScuroNeko opened this issue Dec 17, 2018 · 1 comment

Comments

@ScuroNeko
Copy link

ScuroNeko commented Dec 17, 2018

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

@MinnDevelopment
Copy link
Owner

This is a duplicate of discord/discord-rpc#170

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants