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
public class PermissionException extends RuntimeException
Indicates that the currently logged in account does not meet the specifiedPermission
fromgetPermission()
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PermissionException(String reason)
Creates a new PermissionException instance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Permission
getPermission()
ThePermission
that is required for the operation-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
PermissionException
public PermissionException(String reason)
Creates a new PermissionException instance- Parameters:
reason
- The reason for this Exception
-
-
Method Detail
-
getPermission
public Permission getPermission()
ThePermission
that is required for the operationIf this is a
HierarchyException
this will always bePermission.UNKNOWN
!- Returns:
- The required
Permission
-
-