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
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe target type this privilege applies to. -
Constructor Summary
ConstructorsConstructorDescriptionIntegrationPrivilege(Guild guild, IntegrationPrivilege.Type type, boolean enabled, long id) -
Method Summary
Modifier and TypeMethodDescriptionbooleangetGuild()TheGuildthis IntegrationPrivilege was created in.longThe Snowflake id of this entity.getType()TheIntegrationPrivilege.Typeof entity this privilege is applied to.inthashCode()booleanTrue if this privilege is denying access to the commandbooleanTrue if this privilege is granting access to the commandbooleanWhether this IntegrationPrivilege targets "All channels"booleanWhether 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:ISnowflakeThe Snowflake id of this entity. This is unique to every entity and will never change.- Specified by:
getIdLongin interfaceISnowflake- Returns:
- Long containing the Id.
-
getType
TheIntegrationPrivilege.Typeof entity this privilege is applied to.- Returns:
- The target
IntegrationPrivilege.Type
-
getGuild
TheGuildthis 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
-