So I'm trying to log the user username + tag (given my the readme), but it's not running the callback and it's not making my profile show I'm playing something
public void check(Logger LOGGER)
{
LOGGER.info("Getting USER.");
DiscordEventHandlers handlers = new DiscordEventHandlers.Builder().setReadyEventHandler((user) -> {
LOGGER.info("Got USER.");
LOGGER.info("Welcome " + user.username + "#" + user.discriminator + "!");
}).build();
DiscordRPC.discordInitialize( client ID of the bot , handlers, true);
DiscordRPC.discordRegister( client ID of the bot , "");
}
public DiscordRichPresence createRPC(Logger LOGGER)
{
DiscordRichPresence rich = new DiscordRichPresence.Builder("This is the current state.").setDetails("These are some details.").build();
return rich;
}
public void updateRPC(Logger LOGGER, DiscordRichPresence rich)
{
DiscordRPC.discordRunCallbacks();
DiscordRPC.discordUpdatePresence(rich);
}
Each function is called from top to bottom, what am I doing wrong?
Edit*: I made the RP work, but the ".setReadyEventListener()" isn't work, here's the event code now (and I do have a thread that loops, and runs "DiscordRPC.discordRunCallbacks();"):
So I'm trying to log the user username + tag (given my the readme), but it's not running the callback and it's not making my profile show I'm playing something
Each function is called from top to bottom, what am I doing wrong?
Edit*: I made the RP work, but the ".setReadyEventListener()" isn't work, here's the event code now (and I do have a thread that loops, and runs "DiscordRPC.discordRunCallbacks();"):