Record Class UserMissingPermissions
java.lang.Object
java.lang.Record
dev.sympho.modular_commands.api.command.result.UserMissingPermissions
- Record Components:
missingDiscordPermissions- The built-in permissions that the user is missing but are required to run the command.
- All Implemented Interfaces:
CommandFailure,CommandFailureMessage,CommandResult
public record UserMissingPermissions(discord4j.rest.util.PermissionSet missingDiscordPermissions)
extends Record
implements CommandFailureMessage
A failure result due to the user having insufficient permissions.
- Since:
- 1.0
- Version:
- 1.0
-
Constructor Summary
ConstructorsConstructorDescriptionUserMissingPermissions(discord4j.rest.util.PermissionSet missingDiscordPermissions) Creates an instance of aUserMissingPermissionsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.message()Retrieves the message to the user.discord4j.rest.util.PermissionSetReturns the value of themissingDiscordPermissionsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
UserMissingPermissions
public UserMissingPermissions(discord4j.rest.util.PermissionSet missingDiscordPermissions) Creates an instance of aUserMissingPermissionsrecord class.- Parameters:
missingDiscordPermissions- the value for themissingDiscordPermissionsrecord component
-
-
Method Details
-
message
Description copied from interface:CommandFailureMessageRetrieves the message to the user.- Specified by:
messagein interfaceCommandFailureMessage- Returns:
- The message to the user.
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
missingDiscordPermissions
public discord4j.rest.util.PermissionSet missingDiscordPermissions()Returns the value of themissingDiscordPermissionsrecord component.- Returns:
- the value of the
missingDiscordPermissionsrecord component
-