Package net.dv8tion.jda.api.exceptions
Class PermissionException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
net.dv8tion.jda.api.exceptions.PermissionException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
HierarchyException
,InsufficientPermissionException
Indicates that the currently logged in account does not meet the specified
Permission
from getPermission()
- See Also:
-
Constructor Summary
ConstructorDescriptionPermissionException
(String reason) Creates a new PermissionException instance -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
PermissionException
Creates a new PermissionException instance- Parameters:
reason
- The reason for this Exception
-
-
Method Details
-
getPermission
ThePermission
that is required for the operationIf this is a
HierarchyException
this will always bePermission.UNKNOWN
!- Returns:
- The required
Permission
-