Class: Discorb::Message::Sticker

Inherits:
Object
  • Object
show all
Defined in:
lib/discorb/message.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) -> Sticker

Returns a new instance of Sticker.



593
594
595
596
597
# File 'lib/discorb/message.rb', line 593

def initialize(data)
  @id = Snowflake.new(data[:id])
  @name = data[:name]
  @format = Discorb::Sticker.sticker_format[data[:format]]
end

Instance Attribute Details

#format -> Object (readonly)

Returns the value of attribute format.



591
592
593
# File 'lib/discorb/message.rb', line 591

def format
  @format
end

#id -> Object (readonly)

Returns the value of attribute id.



591
592
593
# File 'lib/discorb/message.rb', line 591

def id
  @id
end

#name -> Object (readonly)

Returns the value of attribute name.



591
592
593
# File 'lib/discorb/message.rb', line 591

def name
  @name
end