Class: Discordrb::EmbedImage

Inherits:
Object
  • Object
show all
Defined in:
lib/discordrb/data/embed.rb

Overview

An Embed image for the embed object.

Instance Attribute Summary collapse

Instance Attribute Details

#content_type ⇒ String? (readonly)

Returns the media type of the image.

Returns:

  • (String, nil) —

    the media type of the image.



134
135
136
# File 'lib/discordrb/data/embed.rb', line 134

def content_type
  @content_type
end

#description ⇒ String? (readonly)

Returns the alt text of the image.

Returns:

  • (String, nil) —

    the alt text of the image.



131
132
133
# File 'lib/discordrb/data/embed.rb', line 131

def description
  @description
end

#embed ⇒ Embed (readonly)

Returns the embed object this is based on.

Returns:

  • (Embed) —

    the embed object this is based on.



113
114
115
# File 'lib/discordrb/data/embed.rb', line 113

def embed
  @embed
end

#flags ⇒ Integer (readonly)

Returns the flags of the image, as a bitfield.

Returns:

  • (Integer) —

    the flags of the image, as a bitfield.



128
129
130
# File 'lib/discordrb/data/embed.rb', line 128

def flags
  @flags
end

#height ⇒ Integer (readonly)

Returns the height of the image, in pixels.

Returns:

  • (Integer) —

    the height of the image, in pixels.



125
126
127
# File 'lib/discordrb/data/embed.rb', line 125

def height
  @height
end

#placeholder ⇒ String? (readonly)

Returns the thumbhash of the image.

Returns:

  • (String, nil) —

    the thumbhash of the image.



137
138
139
# File 'lib/discordrb/data/embed.rb', line 137

def placeholder
  @placeholder
end

#placeholder_version ⇒ Integer? (readonly)

Returns the version of the image's thumbhash.

Returns:

  • (Integer, nil) —

    the version of the image's thumbhash.



140
141
142
# File 'lib/discordrb/data/embed.rb', line 140

def placeholder_version
  @placeholder_version
end

#proxy_url ⇒ String (readonly)

Returns the proxy URL of the image.

Returns:

  • (String) —

    the proxy URL of the image.



119
120
121
# File 'lib/discordrb/data/embed.rb', line 119

def proxy_url
  @proxy_url
end

#url ⇒ String (readonly)

Returns the source URL of the image.

Returns:

  • (String) —

    the source URL of the image.



116
117
118
# File 'lib/discordrb/data/embed.rb', line 116

def url
  @url
end

#width ⇒ Integer (readonly)

Returns the width of the image, in pixels.

Returns:

  • (Integer) —

    the width of the image, in pixels.



122
123
124
# File 'lib/discordrb/data/embed.rb', line 122

def width
  @width
end