Class: Discordrb::Embed

Inherits:
Object
  • Object
show all
Defined in:
lib/discordrb/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

Instance Method Summary collapse

Instance Attribute Details

#author ⇒ EmbedAuthor? (readonly)



47
48
49
# File 'lib/discordrb/data/embed.rb', line 47

def author
  @author
end

#color ⇒ String? (readonly) Also known as: colour



28
29
30
# File 'lib/discordrb/data/embed.rb', line 28

def color
  @color
end

#description ⇒ String? (readonly)



15
16
17
# File 'lib/discordrb/data/embed.rb', line 15

def description
  @description
end

#fields ⇒ Array<EmbedField>? (readonly)



50
51
52
# File 'lib/discordrb/data/embed.rb', line 50

def fields
  @fields
end


32
33
34
# File 'lib/discordrb/data/embed.rb', line 32

def footer
  @footer
end

#image ⇒ EmbedImage? (readonly)



38
39
40
# File 'lib/discordrb/data/embed.rb', line 38

def image
  @image
end

#provider ⇒ EmbedProvider? (readonly)



35
36
37
# File 'lib/discordrb/data/embed.rb', line 35

def provider
  @provider
end

#thumbnail ⇒ EmbedThumbnail? (readonly)



41
42
43
# File 'lib/discordrb/data/embed.rb', line 41

def thumbnail
  @thumbnail
end

#timestamp ⇒ Time? (readonly)



25
26
27
# File 'lib/discordrb/data/embed.rb', line 25

def timestamp
  @timestamp
end

#title ⇒ String? (readonly)



12
13
14
# File 'lib/discordrb/data/embed.rb', line 12

def title
  @title
end

#type ⇒ Symbol (readonly)



22
23
24
# File 'lib/discordrb/data/embed.rb', line 22

def type
  @type
end

#url ⇒ String (readonly)



9
10
11
# File 'lib/discordrb/data/embed.rb', line 9

def url
  @url
end

#video ⇒ EmbedVideo? (readonly)



44
45
46
# File 'lib/discordrb/data/embed.rb', line 44

def video
  @video
end

Instance Method Details

#message ⇒ Message?



72
73
74
# File 'lib/discordrb/data/embed.rb', line 72

def message
  @message unless @message.is_a?(Snapshot)
end

#snapshot ⇒ Snapshot?



77
78
79
# File 'lib/discordrb/data/embed.rb', line 77

def snapshot
  @message unless @message.is_a?(Message)
end