Class: Discorb::Message::Sticker

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

Overview

Represents a sticker.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) -> Sticker

Returns a new instance of Sticker.



99
100
101
102
103
# File 'lib/discorb/message_meta.rb', line 99

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.



97
98
99
# File 'lib/discorb/message_meta.rb', line 97

def format
  @format
end

#id -> Object (readonly)

Returns the value of attribute id.



97
98
99
# File 'lib/discorb/message_meta.rb', line 97

def id
  @id
end

#name -> Object (readonly)

Returns the value of attribute name.



97
98
99
# File 'lib/discorb/message_meta.rb', line 97

def name
  @name
end