Discord::CodeException
Inherits Discord::StatusException / Exception / Reference / Object
This exception is raised in REST#request when a request fails with an
API error response that has a code and a descriptive message.
Constructors
new(response : HTTP::Client::Response, error : APIError)
SourceInstance methods
error
Sourceerror_message
The API error message that was returned by Discord, for example "Bots cannot use this endpoint" or "Provided too few or too many messages to delete. Must provide at least 2 and fewer than 100 messages to delete.".
message
Sourceto_s(io)
Source