Jda: Glitch with tokens

Created on 17 Oct 2017  路  5Comments  路  Source: DV8FromTheWorld/JDA

javax.security.auth.login.LoginException: The provided token is invalid!
at net.dv8tion.jda.core.entities.impl.JDAImpl.verifyToken(JDAImpl.java:244)
at net.dv8tion.jda.core.entities.impl.JDAImpl.login(JDAImpl.java:134)
at net.dv8tion.jda.core.JDABuilder.buildAsync(JDABuilder.java:541)
at net.dv8tion.jda.core.JDABuilder.buildBlocking(JDABuilder.java:582)
at net.dv8tion.jda.core.JDABuilder.buildBlocking(JDABuilder.java:613)
at net.loreofcrafters.cloud.Cloud.main(Cloud.java:16)

That is the error I keep getting, however, the token is correct. My code:

package net.loreofcrafters.cloud;

import javax.security.auth.login.LoginException;

import net.dv8tion.jda.core.AccountType;
import net.dv8tion.jda.core.JDA;
import net.dv8tion.jda.core.JDABuilder;
import net.dv8tion.jda.core.exceptions.RateLimitedException;
import net.loreofcrafters.cloud.events.HelpCommand;

public class Cloud {

public static JDA api;

public static void main(String[] args) {
    try {
        api = new JDABuilder(AccountType.BOT).setToken("REMOVED FOR SECURITY").buildBlocking();
        api.addEventListener(new HelpCommand());
    } catch (LoginException | IllegalArgumentException | InterruptedException | RateLimitedException e) {
        e.printStackTrace();
    }
}

}

Most helpful comment

It wasn't instantly closed and maybe you don't need to be rude when responding.

All 5 comments

Why did you even create this Issue?

I had an issue?

Well if you had an issue that was resolved prior to you creating a issue on GH (this issue was instantly closed), then just don't post it at all

This is not a support forum. Try to solve problems yourself first and read our docs before posting stupid questions here. This is meant for bugs, feature requests and at least more complicated questions (that aren't just JDA or Java 101)

It wasn't instantly closed and maybe you don't need to be rude when responding.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

istamendil picture istamendil  路  3Comments

M4itreG picture M4itreG  路  5Comments

AutismSpeaks picture AutismSpeaks  路  4Comments

Bastian picture Bastian  路  5Comments

MinnDevelopment picture MinnDevelopment  路  5Comments