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:
java.io.Serializable
- Direct Known Subclasses:
HierarchyException
,InsufficientPermissionException
public class PermissionException extends java.lang.RuntimeException
Indicates that the currently logged in account does not meet the specifiedPermission
fromgetPermission()
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PermissionException(java.lang.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
-
-
-
Method Detail
-
getPermission
@Nonnull public Permission getPermission()
ThePermission
that is required for the operationIf this is a
HierarchyException
this will always bePermission.UNKNOWN
!- Returns:
- The required
Permission
-
-