Exception: Async::Discord::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/async/discord/error.rb

Overview

Base error for all Discord API errors.

Instance Attribute Summary collapse

Instance Method Summary collapse

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, message, status: nil)
  @code   = code
  @status = status
  super(message)
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



13
14
15
# File 'lib/async/discord/error.rb', line 13

def code
  @code
end

#statusObject (readonly)

Returns the value of attribute status.



13
14
15
# File 'lib/async/discord/error.rb', line 13

def status
  @status
end