Enum Class Permission

java.lang.Object
java.lang.Enum<Permission>
discord4j.rest.util.Permission
All Implemented Interfaces:
Serializable, Comparable<Permission>, Constable

public enum Permission extends Enum<Permission>
Permissions are a way to limit and grant certain abilities to users.
See Also:
  • Enum Constant Details

    • 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.
    • STREAM

      public static final Permission STREAM
      Allows for Stream in voice channel.
    • VIEW_CHANNEL

      public static final Permission VIEW_CHANNEL
      Allows guild members to view a channel, which includes reading messages in text channels and joining voice channels.
    • SEND_MESSAGES

      public static final Permission 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

      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.
    • PIN_MESSAGES

      public static final Permission PIN_MESSAGES
      Allows users to pin and unpin messages in channels.
    • 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.
    • VIEW_GUILD_INSIGHTS

      public static final Permission VIEW_GUILD_INSIGHTS
      Allows for viewing guild insights.
    • 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

      @Deprecated public static final Permission MANAGE_EMOJIS
      Deprecated.
      use the official permission name: MANAGE_GUILD_EXPRESSIONS
      Allows management and editing of emojis.
    • MANAGE_EMOJIS_AND_STICKERS

      @Deprecated public static final Permission MANAGE_EMOJIS_AND_STICKERS
      Deprecated.
      use the official permission name: MANAGE_GUILD_EXPRESSIONS
      Allows management and editing of emojis and stickers.
    • MANAGE_GUILD_EXPRESSIONS

      public static final Permission MANAGE_GUILD_EXPRESSIONS
      Allows for editing and deleting emojis, stickers, and soundboard sounds created by all users.
    • CREATE_GUILD_EXPRESSIONS

      public static final Permission 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 public static final Permission USE_SLASH_COMMANDS
      Deprecated.
      use the official permission name: USE_APPLICATION_COMMANDS
      Allows members to use slash commands in text channels.
    • USE_APPLICATION_COMMANDS

      public static final Permission USE_APPLICATION_COMMANDS
      Allows members to use application commands, including slash commands and context menu commands.
    • REQUEST_TO_SPEAK

      @Experimental public static final Permission 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

      public static final Permission MANAGE_EVENTS
      Allows for editing and deleting scheduled events created by all users.
    • CREATE_EVENTS

      public static final Permission CREATE_EVENTS
      Allows for creating scheduled events, and editing and deleting those created by the current user.
    • MANAGE_THREADS

      public static final Permission MANAGE_THREADS
      Allows for deleting and archiving threads, and viewing all private threads.
    • CREATE_PUBLIC_THREADS

      public static final Permission CREATE_PUBLIC_THREADS
      Allows for creating public and announcement threads.
    • USE_PUBLIC_THREADS

      @Deprecated public static final Permission USE_PUBLIC_THREADS
      Deprecated.
      use the official permission name: CREATE_PUBLIC_THREADS
      Allows for creating and participating in threads.
    • CREATE_PRIVATE_THREADS

      public static final Permission CREATE_PRIVATE_THREADS
      Allows for creating private threads.
    • USE_PRIVATE_THREADS

      @Deprecated public static final Permission USE_PRIVATE_THREADS
      Deprecated.
      use the official permission name: CREATE_PRIVATE_THREADS
      Allows for creating and participating in private threads
    • USE_EXTERNAL_STICKERS

      public static final Permission USE_EXTERNAL_STICKERS
      Allows the usage of custom stickers from other servers.
    • SEND_MESSAGES_IN_THREADS

      public static final Permission SEND_MESSAGES_IN_THREADS
      Allows for sending messages in threads
    • USE_EMBEDDED_ACTIVITIES

      public static final Permission USE_EMBEDDED_ACTIVITIES
      Allows for using Activities (applications with the EMBEDDED flag) in a voice channel.
    • MODERATE_MEMBERS

      public static final Permission 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

      public static final Permission VIEW_CREATOR_MONETIZATION_ANALYTICS
      Allows for viewing role subscription insights
    • USE_SOUNDBOARD

      public static final Permission USE_SOUNDBOARD
      Allows for using soundboard in a voice channel
    • USE_EXTERNAL_SOUNDS

      public static final Permission USE_EXTERNAL_SOUNDS
      Allows the usage of custom soundboard sounds from other servers
    • SEND_VOICE_MESSAGES

      public static final Permission SEND_VOICE_MESSAGES
      Allows sending voice messages.
    • SEND_POLLS

      public static final Permission SEND_POLLS
      Allows creating polls
    • USE_EXTERNAL_APPS

      public static final Permission 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

      public static Permission[] 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 Permission 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
    • 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.