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
ConstructorsConstructorDescriptionAccountTypeException(AccountType requiredType) Creates a new AccountTypeException instanceAccountTypeException(AccountType requiredType, String message) Creates a new AccountTypeException instance -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcheck(AccountType actualType, AccountType requiredType) The requiredAccountTypefor 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 requiredAccountTypefor the operation
-
AccountTypeException
Creates a new AccountTypeException instance- Parameters:
requiredType- The requiredAccountTypefor the operationmessage- A specialized message
-
-
Method Details
-
getRequiredType
The requiredAccountTypefor the operation- Returns:
- AccountType
-
check
-