Class: RubyCord::PartialEmoji
- Inherits:
-
DiscordModel
- Object
- DiscordModel
- RubyCord::PartialEmoji
- Defined in:
- lib/rubycord/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 ⇒ RubyCord::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.
192 193 194 |
# File 'lib/rubycord/emoji.rb', line 192 def deleted @deleted end |
#id ⇒ RubyCord::Snowflake (readonly)
Returns The ID of the emoji.
188 189 190 |
# File 'lib/rubycord/emoji.rb', line 188 def id @id end |
#name ⇒ String (readonly)
Returns The name of the emoji.
190 191 192 |
# File 'lib/rubycord/emoji.rb', line 190 def name @name end |
Instance Method Details
#inspect ⇒ Object
217 218 219 |
# File 'lib/rubycord/emoji.rb', line 217 def inspect "#<#{self.class} id=#{@id} :#{@name}:>" end |
#to_s ⇒ String
Format the emoji for sending.
226 227 228 |
# File 'lib/rubycord/emoji.rb', line 226 def to_s "<#{@animated ? "a" : ""}:#{@name}:#{@id}>" end |
#to_uri ⇒ String
Format the emoji for URI.
213 214 215 |
# File 'lib/rubycord/emoji.rb', line 213 def to_uri "#{@name}:#{@id}" end |