Class: Discordrb::Embed
- Inherits:
-
Object
- Object
- Discordrb::Embed
- Defined in:
- lib/discordrb/data.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.
2144 2145 2146 |
# File 'lib/discordrb/data.rb', line 2144 def @author end |
#color ⇒ String? (readonly) Also known as: colour
Returns the color of the embed object. nil
if there is not a color.
2125 2126 2127 |
# File 'lib/discordrb/data.rb', line 2125 def color @color end |
#description ⇒ String? (readonly)
Returns the description of the embed object. nil
if there is not a description.
2112 2113 2114 |
# File 'lib/discordrb/data.rb', line 2112 def description @description end |
#fields ⇒ Array<EmbedField>? (readonly)
Returns the fields of the embed object. nil
if there are no fields.
2147 2148 2149 |
# File 'lib/discordrb/data.rb', line 2147 def fields @fields end |
#footer ⇒ EmbedFooter? (readonly)
Returns the footer of the embed object. nil
if there is not a footer.
2129 2130 2131 |
# File 'lib/discordrb/data.rb', line 2129 def @footer end |
#image ⇒ EmbedImage? (readonly)
Returns the image of the embed object. nil
if there is not an image.
2135 2136 2137 |
# File 'lib/discordrb/data.rb', line 2135 def image @image end |
#message ⇒ Message (readonly)
Returns the message this embed object is contained in.
2103 2104 2105 |
# File 'lib/discordrb/data.rb', line 2103 def @message end |
#provider ⇒ EmbedProvider? (readonly)
Returns the provider of the embed object. nil
if there is not a provider.
2132 2133 2134 |
# File 'lib/discordrb/data.rb', line 2132 def provider @provider end |
#thumbnail ⇒ EmbedThumbnail? (readonly)
Returns the thumbnail of the embed object. nil
if there is not a thumbnail.
2138 2139 2140 |
# File 'lib/discordrb/data.rb', line 2138 def thumbnail @thumbnail end |
#timestamp ⇒ Time? (readonly)
Returns the timestamp of the embed object. nil
if there is not a timestamp.
2122 2123 2124 |
# File 'lib/discordrb/data.rb', line 2122 def @timestamp end |
#title ⇒ String? (readonly)
Returns the title of the embed object. nil
if there is not a title.
2109 2110 2111 |
# File 'lib/discordrb/data.rb', line 2109 def title @title end |
#type ⇒ Symbol (readonly)
Returns the type of the embed object. Possible types are:
:link
:video
:image
.
2119 2120 2121 |
# File 'lib/discordrb/data.rb', line 2119 def type @type end |
#url ⇒ String (readonly)
Returns the URL this embed object is based on.
2106 2107 2108 |
# File 'lib/discordrb/data.rb', line 2106 def url @url end |
#video ⇒ EmbedVideo? (readonly)
Returns the video of the embed object. nil
if there is not a video.
2141 2142 2143 |
# File 'lib/discordrb/data.rb', line 2141 def video @video end |