Class: Discordrb::Components::MediaGallery::Item

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

Overview

A singular media attachment.

Instance Attribute Summary collapse

Instance Attribute Details

#descriptionString? (readonly)

Returns the alternative text for the gallery item's media.

Returns:

  • (String, nil)

    the alternative text for the gallery item's media.



342
343
344
# File 'lib/discordrb/data/component.rb', line 342

def description
  @description
end

#mediaMediaItem (readonly)

Returns the unfurled media content of the gallery item.

Returns:

  • (MediaItem)

    the unfurled media content of the gallery item.



334
335
336
# File 'lib/discordrb/data/component.rb', line 334

def media
  @media
end

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

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

Returns:

  • (true, false)

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



338
339
340
# File 'lib/discordrb/data/component.rb', line 338

def spoiler
  @spoiler
end