Class: Discorb::PartialEmoji
- Inherits:
-
DiscordModel
- Object
- DiscordModel
- Discorb::PartialEmoji
- Defined in:
- lib/discorb/emoji.rb
Overview
Represents a partial custom emoji in discord.
Instance Attribute Summary collapse
-
#deleted -> Boolean
(also: #deleted?)
readonly
Whether the emoji is deleted.
-
#id -> Discorb::Snowflake
readonly
The ID of the emoji.
-
#name -> String
readonly
The name of the emoji.
Instance Method Summary collapse
- #inspect -> Object
-
#to_s -> String
Format the emoji for sending.
-
#to_uri -> String
Format the emoji for URI.
Methods inherited from DiscordModel
Instance Attribute Details
#deleted -> Boolean (readonly) Also known as: deleted?
Returns Whether the emoji is deleted.
193 194 195 |
# File 'lib/discorb/emoji.rb', line 193 def deleted @deleted end |
#id -> Discorb::Snowflake (readonly)
Returns The ID of the emoji.
189 190 191 |
# File 'lib/discorb/emoji.rb', line 189 def id @id end |
#name -> String (readonly)
Returns The name of the emoji.
191 192 193 |
# File 'lib/discorb/emoji.rb', line 191 def name @name end |
Instance Method Details
#inspect -> Object
218 219 220 |
# File 'lib/discorb/emoji.rb', line 218 def inspect "#<#{self.class} id=#{@id} :#{@name}:>" end |
#to_s -> String
Format the emoji for sending.
227 228 229 |
# File 'lib/discorb/emoji.rb', line 227 def to_s "<#{@animated ? "a" : ""}:#{@name}:#{@id}>" end |
#to_uri -> String
Format the emoji for URI.
214 215 216 |
# File 'lib/discorb/emoji.rb', line 214 def to_uri "#{@name}:#{@id}" end |