Package org.javacord.api.interaction
Interface ApplicationCommandPermissions
-
public interface ApplicationCommandPermissions
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default booleanaffectsAllChannels()Gets whether these permissions affect all the server's channels.default booleanaffectsEveryoneRole()Gets whether these permissions affect the everyone role.java.util.Optional<ServerChannel>getChannel()Gets the channel that these permissions affect, if it is a single channel.longgetId()Gets the ID of the affectedApplicationCommandPermissionType.booleangetPermission()Whether this permission is enabled or disabled for the application command permissions.java.util.Optional<Role>getRole()Returns the role that these permissions affect.ServergetServer()Gets the server this command permissions belongs to.ApplicationCommandPermissionTypegetType()java.util.Optional<User>getUser()Returns the user that these permissions affect.
-
-
-
Method Detail
-
getId
long getId()
Gets the ID of the affectedApplicationCommandPermissionType.- Returns:
- The ID.
-
getType
ApplicationCommandPermissionType getType()
- Returns:
- The type of this application command permissions.
-
getPermission
boolean getPermission()
Whether this permission is enabled or disabled for the application command permissions.- Returns:
- True if the command is enabled for this user or role, otherwise false.
-
getRole
java.util.Optional<Role> getRole()
Returns the role that these permissions affect.- Returns:
- The role that these permissions affect.
-
getUser
java.util.Optional<User> getUser()
Returns the user that these permissions affect.- Returns:
- The user that these permissions affect.
-
getChannel
java.util.Optional<ServerChannel> getChannel()
Gets the channel that these permissions affect, if it is a single channel.- Returns:
- The channel that these permissions affect.
-
getServer
Server getServer()
Gets the server this command permissions belongs to.- Returns:
- The server this command permissions belongs to.
-
affectsAllChannels
default boolean affectsAllChannels()
Gets whether these permissions affect all the server's channels.- Returns:
- Whether these permissions affect all the server's channels.
-
affectsEveryoneRole
default boolean affectsEveryoneRole()
Gets whether these permissions affect the everyone role.- Returns:
- Whether these permissions affect the everyone role.
-
-