Class: OnyxCord::Components::Thumbnail

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



310
311
312
# File 'lib/onyxcord/models/component.rb', line 310

def description
  @description
end

#idInteger (readonly)

Returns the numeric identifier of the thumbnail.

Returns:

  • (Integer)

    the numeric identifier of the thumbnail.



299
300
301
# File 'lib/onyxcord/models/component.rb', line 299

def id
  @id
end

#mediaMediaItem (readonly)

Returns the unfurled media content of the thumbnail.

Returns:

  • (MediaItem)

    the unfurled media content of the thumbnail.



302
303
304
# File 'lib/onyxcord/models/component.rb', line 302

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.



306
307
308
# File 'lib/onyxcord/models/component.rb', line 306

def spoiler
  @spoiler
end