Class: Rubycord::Embed
- Inherits:
-
Object
- Object
- Rubycord::Embed
- Defined in:
- lib/rubycord/data/embed.rb
Overview
An Embed object that is contained in a message A freshly generated embed object will not appear in a message object unless grabbed from its ID in a channel.
Instance Attribute Summary collapse
-
#author ⇒ EmbedAuthor?
readonly
The author of the embed object.
-
#color ⇒ String?
(also: #colour)
readonly
The color of the embed object.
-
#description ⇒ String?
readonly
The description of the embed object.
-
#fields ⇒ Array<EmbedField>?
readonly
The fields of the embed object.
-
#footer ⇒ EmbedFooter?
readonly
The footer of the embed object.
-
#image ⇒ EmbedImage?
readonly
The image of the embed object.
-
#message ⇒ Message
readonly
The message this embed object is contained in.
-
#provider ⇒ EmbedProvider?
readonly
The provider of the embed object.
-
#thumbnail ⇒ EmbedThumbnail?
readonly
The thumbnail of the embed object.
-
#timestamp ⇒ Time?
readonly
The timestamp of the embed object.
-
#title ⇒ String?
readonly
The title of the embed object.
-
#type ⇒ Symbol
readonly
The type of the embed object.
-
#url ⇒ String
readonly
The URL this embed object is based on.
-
#video ⇒ EmbedVideo?
readonly
The video of the embed object.
Instance Attribute Details
#author ⇒ EmbedAuthor? (readonly)
Returns the author of the embed object. nil
if there is not an author.
48 49 50 |
# File 'lib/rubycord/data/embed.rb', line 48 def @author end |
#color ⇒ String? (readonly) Also known as: colour
Returns the color of the embed object. nil
if there is not a color.
29 30 31 |
# File 'lib/rubycord/data/embed.rb', line 29 def color @color end |
#description ⇒ String? (readonly)
Returns the description of the embed object. nil
if there is not a description.
16 17 18 |
# File 'lib/rubycord/data/embed.rb', line 16 def description @description end |
#fields ⇒ Array<EmbedField>? (readonly)
Returns the fields of the embed object. nil
if there are no fields.
51 52 53 |
# File 'lib/rubycord/data/embed.rb', line 51 def fields @fields end |
#footer ⇒ EmbedFooter? (readonly)
Returns the footer of the embed object. nil
if there is not a footer.
33 34 35 |
# File 'lib/rubycord/data/embed.rb', line 33 def @footer end |
#image ⇒ EmbedImage? (readonly)
Returns the image of the embed object. nil
if there is not an image.
39 40 41 |
# File 'lib/rubycord/data/embed.rb', line 39 def image @image end |
#message ⇒ Message (readonly)
Returns the message this embed object is contained in.
7 8 9 |
# File 'lib/rubycord/data/embed.rb', line 7 def @message end |
#provider ⇒ EmbedProvider? (readonly)
Returns the provider of the embed object. nil
if there is not a provider.
36 37 38 |
# File 'lib/rubycord/data/embed.rb', line 36 def provider @provider end |
#thumbnail ⇒ EmbedThumbnail? (readonly)
Returns the thumbnail of the embed object. nil
if there is not a thumbnail.
42 43 44 |
# File 'lib/rubycord/data/embed.rb', line 42 def thumbnail @thumbnail end |
#timestamp ⇒ Time? (readonly)
Returns the timestamp of the embed object. nil
if there is not a timestamp.
26 27 28 |
# File 'lib/rubycord/data/embed.rb', line 26 def @timestamp end |
#title ⇒ String? (readonly)
Returns the title of the embed object. nil
if there is not a title.
13 14 15 |
# File 'lib/rubycord/data/embed.rb', line 13 def title @title end |
#type ⇒ Symbol (readonly)
Returns the type of the embed object. Possible types are:
:link
:video
:image
.
23 24 25 |
# File 'lib/rubycord/data/embed.rb', line 23 def type @type end |
#url ⇒ String (readonly)
Returns the URL this embed object is based on.
10 11 12 |
# File 'lib/rubycord/data/embed.rb', line 10 def url @url end |
#video ⇒ EmbedVideo? (readonly)
Returns the video of the embed object. nil
if there is not a video.
45 46 47 |
# File 'lib/rubycord/data/embed.rb', line 45 def video @video end |