Enum Class Scope

java.lang.Object
java.lang.Enum<Scope>
discord4j.oauth2.Scope
All Implemented Interfaces:
Serializable, Comparable<Scope>, Constable

public enum Scope extends Enum<Scope>
A permission granted to an AccessToken which grants access to an associated user-specific resource.
See Also:
  • Enum Constant Details

    • ACTIVITIES_READ

      public static final Scope ACTIVITIES_READ
      Allows retrieving data from list of user's game activities.
    • ACTIVITIES_WRITE

      public static final Scope ACTIVITIES_WRITE
      Allows updating user's activity.
    • APPLICATIONS_BUILDS_READ

      public static final Scope APPLICATIONS_BUILDS_READ
      Allows reading build data for user's applications.
    • APPLICATIONS_BUILDS_UPLOAD

      public static final Scope APPLICATIONS_BUILDS_UPLOAD
      Allows uploading builds for user's applications.
    • APPLICATIONS_COMMANDS

      public static final Scope APPLICATIONS_COMMANDS
      Allows using slash commands in user's selected guild.
    • APPLICATIONS_COMMANDS_UPDATE

      public static final Scope APPLICATIONS_COMMANDS_UPDATE
      Allows updating slash commands using an AccessToken exchanged via a client credentials grant.
    • APPLICATIONS_COMMANDS_PERMISSIONS_UPDATE

      public static final Scope APPLICATIONS_COMMANDS_PERMISSIONS_UPDATE
      Allows your app to update permissions for its commands in a guild a user has permissions to.
    • APPLICATIONS_ENTITLEMENTS

      public static final Scope APPLICATIONS_ENTITLEMENTS
      Allows reading entitlements for user's applications.
    • APPLICATIONS_STORE_UPDATE

      public static final Scope APPLICATIONS_STORE_UPDATE
      Allows reading and updating store data for user's applications.
    • BOT

      public static final Scope BOT
      Joins a bot to user's selected guild.
    • CONNECTIONS

      public static final Scope CONNECTIONS
      Allows retrieving user's linked third-party accounts.
    • DM_CHANNELS_READ

      public static final Scope DM_CHANNELS_READ
      Allows your app to see information about the user's DMs and group DMs.
    • EMAIL

      public static final Scope EMAIL
      Allows retrieving user's email and email verification status.
    • GDM_JOIN

      public static final Scope GDM_JOIN
      Allows joining user to a group DM.
    • GUILDS

      public static final Scope GUILDS
      Allows retrieving partial data from list of user's guilds.
    • GUILDS_JOIN

      public static final Scope GUILDS_JOIN
      Allows joining user to a guild.
    • GUILDS_MEMBERS_READ

      public static final Scope GUILDS_MEMBERS_READ
      Allows returning user's member information in a guild.
    • IDENTIFY

      public static final Scope IDENTIFY
      Allows retrieving user's data excluding email and verified.
    • MESSAGES_READ

      public static final Scope MESSAGES_READ
      Allows reading all messages from user's local Discord client via RPC. Also allows reading messages from user's channels that have been created by the Discord application associated with the AccessToken of this Scope.
    • RELATIONSHIPS_READ

      public static final Scope RELATIONSHIPS_READ
      Allows retrieving user's friends and implicit relationships.
    • ROLE_CONNECTIONS_WRITE

      public static final Scope ROLE_CONNECTIONS_WRITE
      Allows your app to update a user's connection and metadata for the app.
    • RPC

      public static final Scope RPC
      Allows control of user's local Discord client via RPC.
    • RPC_ACTIVITIES_WRITE

      public static final Scope RPC_ACTIVITIES_WRITE
      for local rpc server access, this allows you to control a user's local Discord client.
    • RPC_NOTIFICATIONS_READ

      public static final Scope RPC_NOTIFICATIONS_READ
      Allows receiving notifications from user's local Discord client via RPC.
    • RPC_VOICE_READ

      public static final Scope RPC_VOICE_READ
      For local rpc server access, this allows you to read a user's voice settings and listen for voice events.
    • RPC_VOICE_WRITE

      public static final Scope RPC_VOICE_WRITE
      For local rpc server access, this allows you to update a user's voice settings.
    • VOICE

      public static final Scope VOICE
      Allows your app to connect to voice on user's behalf and see all the voice members.
    • WEBHOOK_INCOMING

      public static final Scope WEBHOOK_INCOMING
      Generates a webhook which can be used to execute the webhook in user's selected channel.
      See Also:
  • Method Details

    • values

      public static Scope[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Scope valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getValue

      public String getValue()
    • requiresDiscordApproval

      public boolean requiresDiscordApproval()
      Gets whether this Scope requires approval from Discord to use.
      Returns:
      Whether this Scope requires approval from Discord to use.
    • of

      public static Scope of(String value)
      Constructs a Scope from the given value.
      Parameters:
      value - The value to construct a Scope from.
      Returns:
      The Scope from the given value.
    • asString

      public static String asString(Scope first, Scope... rest)
      Construct a string from the values for each supplied Scope.
      Parameters:
      first - a scope to include
      rest - the remaining scopes to include
      Returns:
      a string concatenation of each scope supplied, separated by a space