Package discord4j.core.object.util
Enum Permission
- java.lang.Object
-
- java.lang.Enum<Permission>
-
- discord4j.core.object.util.Permission
-
- All Implemented Interfaces:
Serializable
,Comparable<Permission>
public enum Permission extends Enum<Permission>
Permissions are a way to limit and grant certain abilities to users.- See Also:
- Permissions
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ADD_REACTIONS
Allows for the addition of reactions to messages.ADMINISTRATOR
Allows all permissions and bypasses channel permission overwrites.ATTACH_FILES
Allows for uploading images and files.BAN_MEMBERS
Allows banning members.CHANGE_NICKNAME
Allows for modification of own nickname.CONNECT
Allows for joining of a voice channel.CREATE_INSTANT_INVITE
Allows creation of instant invites.DEAFEN_MEMBERS
Allows for deafening of members in a voice channel.EMBED_LINKS
Links sent by users with this permission will be auto-embedded.KICK_MEMBERS
Allows kicking members.MANAGE_CHANNELS
Allows management and editing of channels.MANAGE_EMOJIS
Allows management and editing of emojis.MANAGE_GUILD
Allows management and editing of the guild.MANAGE_MESSAGES
Allows for deletion of other users messages.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.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.MOVE_MEMBERS
Allows for moving of members between voice channels.MUTE_MEMBERS
Allows for muting members in a voice channel.PRIORITY_SPEAKER
Allows for using priority speaker in a voice channel.READ_MESSAGE_HISTORY
Allows for reading of message history.SEND_MESSAGES
Allows for sending messages in a channel.SEND_TTS_MESSAGES
Allows for sending of /tts messages.SPEAK
Allows for speaking in a voice channel.USE_EXTERNAL_EMOJIS
Allows the usage of custom emojis from other servers.USE_VAD
Allows for using voice-activity-detection in a voice channel.VIEW_AUDIT_LOG
Allows for viewing of audit logs.VIEW_CHANNEL
Allows guild members to view a channel, which includes reading messages in text channels.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getValue()
Gets the permission's value.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.static Permission
valueOf(String name)
Returns the enum constant of this type with the specified name.static Permission[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
CREATE_INSTANT_INVITE
public static final Permission CREATE_INSTANT_INVITE
Allows creation of instant invites.
-
KICK_MEMBERS
public static final Permission KICK_MEMBERS
Allows kicking members.
-
BAN_MEMBERS
public static final Permission BAN_MEMBERS
Allows banning members.
-
ADMINISTRATOR
public static final Permission ADMINISTRATOR
Allows all permissions and bypasses channel permission overwrites.
-
MANAGE_CHANNELS
public static final Permission MANAGE_CHANNELS
Allows management and editing of channels.
-
MANAGE_GUILD
public static final Permission MANAGE_GUILD
Allows management and editing of the guild.
-
ADD_REACTIONS
public static final Permission ADD_REACTIONS
Allows for the addition of reactions to messages.
-
VIEW_AUDIT_LOG
public static final Permission VIEW_AUDIT_LOG
Allows for viewing of audit logs.
-
PRIORITY_SPEAKER
public static final Permission PRIORITY_SPEAKER
Allows for using priority speaker in a voice channel.
-
VIEW_CHANNEL
public static final Permission VIEW_CHANNEL
Allows guild members to view a channel, which includes reading messages in text channels.
-
SEND_MESSAGES
public static final Permission SEND_MESSAGES
Allows for sending messages in a channel.
-
SEND_TTS_MESSAGES
public static final Permission SEND_TTS_MESSAGES
Allows for sending of /tts messages.
-
MANAGE_MESSAGES
public static final Permission MANAGE_MESSAGES
Allows for deletion of other users messages.
-
EMBED_LINKS
public static final Permission EMBED_LINKS
Links sent by users with this permission will be auto-embedded.
-
ATTACH_FILES
public static final Permission ATTACH_FILES
Allows for uploading images and files.
-
READ_MESSAGE_HISTORY
public static final Permission READ_MESSAGE_HISTORY
Allows for reading of message history.
-
MENTION_EVERYONE
public static final Permission 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
public static final Permission USE_EXTERNAL_EMOJIS
Allows the usage of custom emojis from other servers.
-
CONNECT
public static final Permission CONNECT
Allows for joining of a voice channel.
-
SPEAK
public static final Permission SPEAK
Allows for speaking in a voice channel.
-
MUTE_MEMBERS
public static final Permission MUTE_MEMBERS
Allows for muting members in a voice channel.
-
DEAFEN_MEMBERS
public static final Permission DEAFEN_MEMBERS
Allows for deafening of members in a voice channel.
-
MOVE_MEMBERS
public static final Permission MOVE_MEMBERS
Allows for moving of members between voice channels.
-
USE_VAD
public static final Permission USE_VAD
Allows for using voice-activity-detection in a voice channel.
-
CHANGE_NICKNAME
public static final Permission CHANGE_NICKNAME
Allows for modification of own nickname.
-
MANAGE_NICKNAMES
public static final Permission MANAGE_NICKNAMES
Allows for modification of other users nicknames.
-
MANAGE_ROLES
public static final Permission MANAGE_ROLES
Allows management and editing of roles.
-
MANAGE_WEBHOOKS
public static final Permission MANAGE_WEBHOOKS
Allows management and editing of webhooks.
-
MANAGE_EMOJIS
public static final Permission MANAGE_EMOJIS
Allows management and editing of emojis.
-
-
Method Detail
-
values
public static Permission[] 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 (Permission c : Permission.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Permission 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
-
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:
true
when the permission requires the owner account to use multi-factor authentication when used on a guild that has server-side MFA enabled,false
otherwise.
-
getValue
public long getValue()
Gets the permission's value.- Returns:
- The permission's value.
-
-