Class IntegrationPrivilege
java.lang.Object
net.dv8tion.jda.api.interactions.commands.privileges.IntegrationPrivilege
- All Implemented Interfaces:
ISnowflake
Privilege used to restrict access to a command within a
Guild
.
Moderators of a Guild can create these privileges inside the Integrations Menu
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
The target type this privilege applies to. -
Constructor Summary
ConstructorDescriptionIntegrationPrivilege
(Guild guild, IntegrationPrivilege.Type type, boolean enabled, long id) -
Method Summary
Modifier and TypeMethodDescriptionboolean
getGuild()
TheGuild
this IntegrationPrivilege was created in.long
The Snowflake id of this entity.getType()
TheIntegrationPrivilege.Type
of entity this privilege is applied to.int
hashCode()
boolean
True if this privilege is denying access to the commandboolean
True if this privilege is granting access to the commandboolean
Whether this IntegrationPrivilege targets "All channels"boolean
Whether this IntegrationPrivilege targets the @everyone RoletoString()
Methods inherited from interface net.dv8tion.jda.api.entities.ISnowflake
getId, getTimeCreated
-
Constructor Details
-
IntegrationPrivilege
public IntegrationPrivilege(@Nonnull Guild guild, @Nonnull IntegrationPrivilege.Type type, boolean enabled, long id)
-
-
Method Details
-
targetsEveryone
public boolean targetsEveryone()Whether this IntegrationPrivilege targets the @everyone Role- Returns:
- True, if this IntegrationPrivilege targets the @everyone Role
-
targetsAllChannels
public boolean targetsAllChannels()Whether this IntegrationPrivilege targets "All channels"- Returns:
- True, if this IntegrationPrivilege targets all channels
-
getIdLong
public long getIdLong()Description copied from interface:ISnowflake
The Snowflake id of this entity. This is unique to every entity and will never change.- Specified by:
getIdLong
in interfaceISnowflake
- Returns:
- Long containing the Id.
-
getType
TheIntegrationPrivilege.Type
of entity this privilege is applied to.- Returns:
- The target
IntegrationPrivilege.Type
-
getGuild
TheGuild
this IntegrationPrivilege was created in.- Returns:
- the guild in which this IntegrationPrivilege was created in.
-
isEnabled
public boolean isEnabled()True if this privilege is granting access to the command- Returns:
- Whether this privilege grants access
-
isDisabled
public boolean isDisabled()True if this privilege is denying access to the command- Returns:
- Whether this privilege denies access
-
hashCode
public int hashCode() -
equals
-
toString
-