Exception: Async::Discord::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Async::Discord::Error
- Defined in:
- lib/async/discord/error.rb
Overview
Base error for all Discord API errors.
Direct Known Subclasses
ApiError, AuthError, GatewayError, RateLimitError, ResponseTooLargeError, ServerError
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(code, message, status: nil) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(code, message, status: nil) ⇒ Error
Returns a new instance of Error.
15 16 17 18 19 |
# File 'lib/async/discord/error.rb', line 15 def initialize(code, , status: nil) @code = code @status = status super() end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
13 14 15 |
# File 'lib/async/discord/error.rb', line 13 def code @code end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
13 14 15 |
# File 'lib/async/discord/error.rb', line 13 def status @status end |