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.



501
502
503
504
505
# File 'lib/discorb/message.rb', line 501

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.



499
500
501
# File 'lib/discorb/message.rb', line 499

def format
  @format
end

#id -> Object (readonly)

Returns the value of attribute id.



499
500
501
# File 'lib/discorb/message.rb', line 499

def id
  @id
end

#name -> Object (readonly)

Returns the value of attribute name.



499
500
501
# File 'lib/discorb/message.rb', line 499

def name
  @name
end