Class: Discordrb::Components::Thumbnail

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

Overview

A content component that compactly displays media.

Instance Attribute Summary collapse

Instance Attribute Details

#descriptionString? (readonly)

Returns the alternative text for the thumbnail's media.

Returns:

  • (String, nil)

    the alternative text for the thumbnail's media.



304
305
306
# File 'lib/discordrb/data/component.rb', line 304

def description
  @description
end

#idInteger (readonly)

Returns the numeric identifier of the thumbnail.

Returns:

  • (Integer)

    the numeric identifier of the thumbnail.



293
294
295
# File 'lib/discordrb/data/component.rb', line 293

def id
  @id
end

#mediaMediaItem (readonly)

Returns the unfurled media content of the thumbnail.

Returns:

  • (MediaItem)

    the unfurled media content of the thumbnail.



296
297
298
# File 'lib/discordrb/data/component.rb', line 296

def media
  @media
end

#spoilertrue, false (readonly) Also known as: spoiler?

Returns whether or not the thumbnail's media should be blurred out.

Returns:

  • (true, false)

    whether or not the thumbnail's media should be blurred out.



300
301
302
# File 'lib/discordrb/data/component.rb', line 300

def spoiler
  @spoiler
end