Package net.dv8tion.jda.api.exceptions
Class AccountTypeException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
net.dv8tion.jda.api.exceptions.AccountTypeException
- All Implemented Interfaces:
Serializable
Indicates that an operation is not possible unless the
AccountType
matches the one provided in getRequiredType()
- See Also:
-
Constructor Summary
ConstructorDescriptionAccountTypeException
(AccountType requiredType) Creates a new AccountTypeException instanceAccountTypeException
(AccountType requiredType, String message) Creates a new AccountTypeException instance -
Method Summary
Modifier and TypeMethodDescriptionstatic void
check
(AccountType actualType, AccountType requiredType) The requiredAccountType
for the operationMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
AccountTypeException
Creates a new AccountTypeException instance- Parameters:
requiredType
- The requiredAccountType
for the operation
-
AccountTypeException
Creates a new AccountTypeException instance- Parameters:
requiredType
- The requiredAccountType
for the operationmessage
- A specialized message
-
-
Method Details
-
getRequiredType
The requiredAccountType
for the operation- Returns:
- AccountType
-
check
-