Class: Discordrb::Channel
- Inherits:
-
Object
- Object
- Discordrb::Channel
- Defined in:
- lib/esm/extension/core/discordrb/channel.rb
Constant Summary collapse
- TYPE_NAMES =
{ 0 => :text, 1 => :dm, 2 => :voice, 3 => :group, 4 => :category }.freeze
Instance Method Summary collapse
- #to_h ⇒ Object (also: #attributes)
Instance Method Details
#to_h ⇒ Object Also known as: attributes
13 14 15 16 17 18 19 20 21 |
# File 'lib/esm/extension/core/discordrb/channel.rb', line 13 def to_h { id: id.to_s, name: name, position: position, type: TYPE_NAMES[type], category: category&.to_h } end |