Enum Intent

    • Enum Constant Detail

      • GUILDS

        public static final Intent GUILDS
        The following event are received.
        • GUILD_CREATE
        • GUILD_UPDATE
        • GUILD_DELETE
        • GUILD_ROLE_CREATE
        • GUILD_ROLE_UPDATE
        • GUILD_ROLE_DELETE
        • CHANNEL_CREATE
        • CHANNEL_UPDATE
        • CHANNEL_DELETE
        • CHANNEL_PINS_UPDATE
      • GUILD_MEMBERS

        public static final Intent GUILD_MEMBERS
        The following events are received.
        • GUILD_MEMBER_ADD
        • GUILD_MEMBER_UPDATE
        • GUILD_MEMBER_REMOVE

        Note: This is a privileged intent which must be enabled in the bots application page in the Developer portal

        See Also:
        Discord developer portal
      • GUILD_BANS

        public static final Intent GUILD_BANS
        The following events are received.
        • GUILD_BAN_ADD
        • GUILD_BAN_REMOVE
      • GUILD_EMOJIS

        public static final Intent GUILD_EMOJIS
        The following events are received.
        • GUILD_EMOJIS_UPDATE
      • GUILD_INTEGRATIONS

        public static final Intent GUILD_INTEGRATIONS
        The following events are received.
        • GUILD_INTEGRATIONS_UPDATE
      • GUILD_WEBHOOKS

        public static final Intent GUILD_WEBHOOKS
        The following events are received.
        • WEBHOOKS_UPDATE
      • GUILD_INVITES

        public static final Intent GUILD_INVITES
        The following events are received.
        • INVITE_CREATE
        • INVITE_DELETE
      • GUILD_VOICE_STATES

        public static final Intent GUILD_VOICE_STATES
        The following events are received.
        • VOICE_STATE_UPDATE
      • GUILD_PRESENCES

        public static final Intent GUILD_PRESENCES
        The following events are received.
        • PRESENCE_UPDATE

        Note: This is a privileged intent which must be enabled in the bots application page in the Developer portal

        See Also:
        Discord developer portal
      • GUILD_MESSAGES

        public static final Intent GUILD_MESSAGES
        The following events are received.
        • MESSAGE_CREATE
        • MESSAGE_UPDATE
        • MESSAGE_DELETE
        • MESSAGE_DELETE_BULK
      • GUILD_MESSAGE_REACTIONS

        public static final Intent GUILD_MESSAGE_REACTIONS
        The following events are received.
        • MESSAGE_REACTION_ADD
        • MESSAGE_REACTION_REMOVE
        • MESSAGE_REACTION_REMOVE_ALL
        • MESSAGE_REACTION_REMOVE_EMOJI
      • GUILD_MESSAGE_TYPING

        public static final Intent GUILD_MESSAGE_TYPING
        The following events are received.
        • TYPING_START
      • DIRECT_MESSAGES

        public static final Intent DIRECT_MESSAGES
        The following events are received.
        • CHANNEL_CREATE
        • MESSAGE_CREATE
        • MESSAGE_UPDATE
        • MESSAGE_DELETE
        • CHANNEL_PINS_UPDATE
      • DIRECT_MESSAGE_REACTIONS

        public static final Intent DIRECT_MESSAGE_REACTIONS
        The following events are received.
        • MESSAGE_REACTION_ADD
        • MESSAGE_REACTION_REMOVE
        • MESSAGE_REACTION_REMOVE_ALL
        • MESSAGE_REACTION_REMOVE_EMOJI
      • DIRECT_MESSAGE_TYPING

        public static final Intent DIRECT_MESSAGE_TYPING
        The following events are received.
        • TYPING_START
    • Method Detail

      • values

        public static Intent[] 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 (Intent c : Intent.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Intent 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 name
        NullPointerException - if the argument is null
      • getId

        public int getId​()
        Gets the id of the intent.
        Returns:
        The id of the intent.
      • isPrivileged

        public boolean isPrivileged​()
        Check if the intent is privileged.

        Privileged intents are usually related so sensitive data and must manually be enabled in the developer portal.

        Returns:
        Whether this intent is privileged or not.
      • calculateBitmask

        public static int calculateBitmask​(Intent... intents)
        Gets the bitmask from the given intents.
        Parameters:
        intents - An array of intents.
        Returns:
        The calculated bitmask.