Class GenericPrivilegeUpdateEvent

java.lang.Object
net.dv8tion.jda.api.events.Event
net.dv8tion.jda.api.events.guild.GenericGuildEvent
net.dv8tion.jda.api.events.interaction.command.GenericPrivilegeUpdateEvent
All Implemented Interfaces:
GenericEvent
Direct Known Subclasses:
ApplicationCommandUpdatePrivilegesEvent, ApplicationUpdatePrivilegesEvent

public abstract class GenericPrivilegeUpdateEvent extends GenericGuildEvent
Indicates that the privileges of an integration or its commands changed.

Can be used to get affected Guild and the new IntegrationPrivileges

  • Constructor Details

  • Method Details

    • getTargetType

      @Nonnull public abstract PrivilegeTargetType getTargetType()
      The target Type.

      This can either be:

      • INTEGRATION - If the privileges have been changed on the integration-level.
      • COMMAND - If the privileges have been changed on a command.
      Returns:
      The target type.
    • getTargetIdLong

      public long getTargetIdLong()
      The target-id.

      This can either be the id of an integration, or of a command.

      Returns:
      The target-id.
      See Also:
    • getTargetId

      @Nonnull public String getTargetId()
      The target-id.

      This can either be the id of an integration, or of a command.

      Returns:
      The target-id.
      See Also:
    • getApplicationIdLong

      public long getApplicationIdLong()
      The id of the application of which privileges have been changed.
      Returns:
      id of the application of which privileges have been changed.
    • getApplicationId

      @Nonnull public String getApplicationId()
      The id of the application of which privileges have been changed.
      Returns:
      id of the application of which privileges have been changed.
    • getPrivileges

      @Nonnull public List<IntegrationPrivilege> getPrivileges()
      The list of new IntegrationPrivileges.
      Returns:
      Unmodifiable list containing the new IntegrationPrivileges.