Package org.javacord.api.exception
Class CannotMessageUserException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- org.javacord.api.exception.DiscordException
-
- org.javacord.api.exception.MissingPermissionsException
-
- org.javacord.api.exception.CannotMessageUserException
-
- All Implemented Interfaces:
java.io.Serializable
public class CannotMessageUserException extends MissingPermissionsException
When the user of the connected account cannot message a user. This might have several reasons, e.g.- The user blocked you
- You don't share a server with the user
- The user does not allow messages from the users in the servers you share with it
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CannotMessageUserException(java.lang.Exception origin, java.lang.String message, RestRequestInformation request, RestRequestResponseInformation response)
Creates a new instance of this class.
-
Method Summary
-
Methods inherited from class org.javacord.api.exception.DiscordException
getRequest, getResponse
-
-
-
-
Constructor Detail
-
CannotMessageUserException
public CannotMessageUserException(java.lang.Exception origin, java.lang.String message, RestRequestInformation request, RestRequestResponseInformation response)
Creates a new instance of this class.- Parameters:
origin
- The origin of the exception.message
- The message of the exception.request
- The information about the request.response
- The information about the response.
-
-