Package discord4j.oauth2
Enum Scope
- java.lang.Object
-
- java.lang.Enum<Scope>
-
- discord4j.oauth2.Scope
-
- All Implemented Interfaces:
Serializable
,Comparable<Scope>
public enum Scope extends Enum<Scope>
A permission granted to anAccessToken
which grants access to an associated user-specific resource.- See Also:
- OAuth2 Scopes
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ACTIVITIES_READ
Allows retrieving data from list of user's game activities.ACTIVITIES_WRITE
Allows updating user's activity.APPLICATIONS_BUILDS_READ
Allows reading build data for user's applications.APPLICATIONS_BUILDS_UPLOAD
Allows uploading builds for user's applications.APPLICATIONS_COMMANDS
Allows using slash commands in user's selected guild.APPLICATIONS_COMMANDS_PERMISSIONS_UPDATE
Allows your app to update permissions for its commands in a guild a user has permissions to.APPLICATIONS_COMMANDS_UPDATE
Allows updating slash commands using anAccessToken
exchanged via a client credentials grant.APPLICATIONS_ENTITLEMENTS
Allows reading entitlements for user's applications.APPLICATIONS_STORE_UPDATE
Allows reading and updating store data for user's applications.BOT
Joins a bot to user's selected guild.CONNECTIONS
Allows retrieving user's linked third-party accounts.DM_CHANNELS_READ
Allows your app to see information about the user's DMs and group DMs.EMAIL
Allows retrieving user's email and email verification status.GDM_JOIN
Allows joining user to a group DM.GUILDS
Allows retrieving partial data from list of user's guilds.GUILDS_JOIN
Allows joining user to a guild.GUILDS_MEMBERS_READ
Allows returning user's member information in a guild.IDENTIFY
MESSAGES_READ
Allows reading all messages from user's local Discord client via RPC.RELATIONSHIPS_READ
Allows retrieving user's friends and implicit relationships.ROLE_CONNECTIONS_WRITE
Allows your app to update a user's connection and metadata for the app.RPC
Allows control of user's local Discord client via RPC.RPC_ACTIVITIES_WRITE
for local rpc server access, this allows you to control a user's local Discord client.RPC_NOTIFICATIONS_READ
Allows receiving notifications from user's local Discord client via RPC.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
For local rpc server access, this allows you to update a user's voice settings.VOICE
Allows your app to connect to voice on user's behalf and see all the voice members.WEBHOOK_INCOMING
Generates a webhook which can be used to execute the webhook in user's selected channel.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static String
asString(Scope first, Scope... rest)
Construct a string from the values for each suppliedScope
.String
getValue()
static Scope
of(String value)
Constructs aScope
from the given value.boolean
requiresDiscordApproval()
Gets whether thisScope
requires approval from Discord to use.static Scope
valueOf(String name)
Returns the enum constant of this type with the specified name.static Scope[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
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 anAccessToken
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
-
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 theAccessToken
of thisScope
.
-
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.
-
-
Method Detail
-
values
public static Scope[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Scope c : Scope.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Scope valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-
getValue
public String getValue()
-
requiresDiscordApproval
public boolean requiresDiscordApproval()
Gets whether thisScope
requires approval from Discord to use.- Returns:
- Whether this
Scope
requires approval from Discord to use.
-
of
public static Scope of(String value)
Constructs aScope
from the given value.- Parameters:
value
- The value to construct aScope
from.- Returns:
- The
Scope
from the given value.
-
-