Class ApplicationInfo

java.lang.Object
com.mrivanplays.jdoa2.ApplicationInfo

public final class ApplicationInfo extends Object
Represents information about the application, driven by this discord api wrapper.
  • Constructor Details

  • Method Details

    • builder

      public static ApplicationInfo.Builder builder()
      Returns:
      builder
    • getAuthCode

      @Nonnull public String getAuthCode()
      Returns the auth code. The auth code is a code, received on url callback, which you have to configure in your discord application config.

      Example of what you need to specify here:

      1. Open your discord application config
      2. Navigate to OAuth2
      3. Add redirect url and save
      4. Generate OAuth2 link with the supported scopes: identify, email, guilds
      After doing all the steps, try using the URL you created. If everything was done correctly, after allowing the application by discord your browser will auto redirect you to your callback url and will append "?code=AUTHENTICATION CODE" to the url, the "authentication code" specified is your authentication code that you need to specify on this value.
      Returns:
      auth code
    • getRedirectUri

      @Nonnull public String getRedirectUri()
      Returns the application's URL callback.
      Returns:
      redirect uri
    • getClientId

      @Nonnull public String getClientId()
      Returns the client id of your application, found in the discord application configuration.
      Returns:
      client id
    • getClientSecret

      @Nonnull public String getClientSecret()
      Returns the client secret of your application, found in the discord application configuration.
      Returns:
      client secret