Package discord4j.rest.util
Enum Class Permission
- All Implemented Interfaces:
Serializable,Comparable<Permission>,Constable
Permissions are a way to limit and grant certain abilities to users.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAllows for the addition of reactions to messages.Allows all permissions and bypasses channel permission overwrites.Allows for uploading images and files.Allows banning members.Allows for modification of own nickname.Allows for joining of a voice channel.Allows for creating scheduled events, and editing and deleting those created by the current user.Allows for creating emojis, stickers, and soundboard sounds, and editing and deleting those created by the current user.Allows creation of instant invites.Allows for creating private threads.Allows for creating public and announcement threads.Allows for deafening of members in a voice channel.Links sent by users with this permission will be auto-embedded.Allows kicking members.Allows management and editing of channels.Deprecated.Deprecated.use the official permission name:MANAGE_GUILD_EXPRESSIONSAllows for editing and deleting scheduled events created by all users.Allows management and editing of the guild.Allows for editing and deleting emojis, stickers, and soundboard sounds created by all users.Allows for deletion of other users messages.Allows for modification of other users nicknames.Allows management and editing of roles.Allows for deleting and archiving threads, and viewing all private threads.Allows management and editing of webhooks.Allows for using the @everyone tag to notify all users in a channel, and the @here tag to notify all online users in a channel.Allows for timing out users to prevent them from sending or reacting to messages in chat and threads, and from speaking in voice and stage channels.Allows for moving of members between voice channels.Allows for muting members in a voice channel.Allows users to pin and unpin messages in channels.Allows for using priority speaker in a voice channel.Allows for reading of message history.Allows for requesting to speak in stage channels.Allows for sending messages in a channel and creating threads in a forum(does not allow sending messages in threads)Allows for sending messages in threadsAllows creating pollsAllows for sending of /tts messages.Allows sending voice messages.Allows for speaking in a voice channel.Allows for Stream in voice channel.Allows members to use application commands, including slash commands and context menu commands.Allows for using Activities (applications with the EMBEDDED flag) in a voice channel.Allows user-installed apps to send public responses.Allows the usage of custom emojis from other servers.Allows the usage of custom soundboard sounds from other serversAllows the usage of custom stickers from other servers.Deprecated.use the official permission name:CREATE_PRIVATE_THREADSDeprecated.use the official permission name:CREATE_PUBLIC_THREADSDeprecated.use the official permission name:USE_APPLICATION_COMMANDSAllows for using soundboard in a voice channelAllows for using voice-activity-detection in a voice channel.Allows for viewing of audit logs.Allows guild members to view a channel, which includes reading messages in text channels and joining voice channels.Allows for viewing role subscription insightsAllows for viewing guild insights. -
Method Summary
Modifier and TypeMethodDescriptionlonggetValue()Gets the permission's value.booleanGets whether the permission requires the owner account to use multi-factor authentication when used on a guild that has server-side MFA enabled.static PermissionReturns the enum constant of this class with the specified name.static Permission[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CREATE_INSTANT_INVITE
Allows creation of instant invites. -
KICK_MEMBERS
Allows kicking members. -
BAN_MEMBERS
Allows banning members. -
ADMINISTRATOR
Allows all permissions and bypasses channel permission overwrites. -
MANAGE_CHANNELS
Allows management and editing of channels. -
MANAGE_GUILD
Allows management and editing of the guild. -
ADD_REACTIONS
Allows for the addition of reactions to messages. -
VIEW_AUDIT_LOG
Allows for viewing of audit logs. -
PRIORITY_SPEAKER
Allows for using priority speaker in a voice channel. -
STREAM
Allows for Stream in voice channel. -
VIEW_CHANNEL
Allows guild members to view a channel, which includes reading messages in text channels and joining voice channels. -
SEND_MESSAGES
Allows for sending messages in a channel and creating threads in a forum(does not allow sending messages in threads) -
SEND_TTS_MESSAGES
Allows for sending of /tts messages. -
MANAGE_MESSAGES
Allows for deletion of other users messages. -
PIN_MESSAGES
Allows users to pin and unpin messages in channels. -
EMBED_LINKS
Links sent by users with this permission will be auto-embedded. -
ATTACH_FILES
Allows for uploading images and files. -
READ_MESSAGE_HISTORY
Allows for reading of message history. -
MENTION_EVERYONE
Allows for using the @everyone tag to notify all users in a channel, and the @here tag to notify all online users in a channel. -
USE_EXTERNAL_EMOJIS
Allows the usage of custom emojis from other servers. -
VIEW_GUILD_INSIGHTS
Allows for viewing guild insights. -
CONNECT
Allows for joining of a voice channel. -
SPEAK
Allows for speaking in a voice channel. -
MUTE_MEMBERS
Allows for muting members in a voice channel. -
DEAFEN_MEMBERS
Allows for deafening of members in a voice channel. -
MOVE_MEMBERS
Allows for moving of members between voice channels. -
USE_VAD
Allows for using voice-activity-detection in a voice channel. -
CHANGE_NICKNAME
Allows for modification of own nickname. -
MANAGE_NICKNAMES
Allows for modification of other users nicknames. -
MANAGE_ROLES
Allows management and editing of roles. -
MANAGE_WEBHOOKS
Allows management and editing of webhooks. -
MANAGE_EMOJIS
Deprecated.use the official permission name:MANAGE_GUILD_EXPRESSIONSAllows management and editing of emojis. -
MANAGE_EMOJIS_AND_STICKERS
Deprecated.use the official permission name:MANAGE_GUILD_EXPRESSIONSAllows management and editing of emojis and stickers. -
MANAGE_GUILD_EXPRESSIONS
Allows for editing and deleting emojis, stickers, and soundboard sounds created by all users. -
CREATE_GUILD_EXPRESSIONS
Allows for creating emojis, stickers, and soundboard sounds, and editing and deleting those created by the current user. -
USE_SLASH_COMMANDS
Deprecated.use the official permission name:USE_APPLICATION_COMMANDSAllows members to use slash commands in text channels. -
USE_APPLICATION_COMMANDS
Allows members to use application commands, including slash commands and context menu commands. -
REQUEST_TO_SPEAK
Allows for requesting to speak in stage channels. Marked as experimental since Discord treats this feature as "under active development and may be changed or removed" -
MANAGE_EVENTS
Allows for editing and deleting scheduled events created by all users. -
CREATE_EVENTS
Allows for creating scheduled events, and editing and deleting those created by the current user. -
MANAGE_THREADS
Allows for deleting and archiving threads, and viewing all private threads. -
CREATE_PUBLIC_THREADS
Allows for creating public and announcement threads. -
USE_PUBLIC_THREADS
Deprecated.use the official permission name:CREATE_PUBLIC_THREADSAllows for creating and participating in threads. -
CREATE_PRIVATE_THREADS
Allows for creating private threads. -
USE_PRIVATE_THREADS
Deprecated.use the official permission name:CREATE_PRIVATE_THREADSAllows for creating and participating in private threads -
USE_EXTERNAL_STICKERS
Allows the usage of custom stickers from other servers. -
SEND_MESSAGES_IN_THREADS
Allows for sending messages in threads -
USE_EMBEDDED_ACTIVITIES
Allows for using Activities (applications with the EMBEDDED flag) in a voice channel. -
MODERATE_MEMBERS
Allows for timing out users to prevent them from sending or reacting to messages in chat and threads, and from speaking in voice and stage channels. -
VIEW_CREATOR_MONETIZATION_ANALYTICS
Allows for viewing role subscription insights -
USE_SOUNDBOARD
Allows for using soundboard in a voice channel -
USE_EXTERNAL_SOUNDS
Allows the usage of custom soundboard sounds from other servers -
SEND_VOICE_MESSAGES
Allows sending voice messages. -
SEND_POLLS
Allows creating polls -
USE_EXTERNAL_APPS
Allows user-installed apps to send public responses.
When disabled, users will still be allowed to use their apps but the responses will be ephemeral.
Note: This only applies to apps not also installed to the server.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
requiresMfa
public boolean requiresMfa()Gets whether the permission requires the owner account to use multi-factor authentication when used on a guild that has server-side MFA enabled.- Returns:
truewhen the permission requires the owner account to use multi-factor authentication when used on a guild that has server-side MFA enabled,falseotherwise.
-
getValue
public long getValue()Gets the permission's value.- Returns:
- The permission's value.
-
MANAGE_GUILD_EXPRESSIONS