Class: Discordrb::Components::MediaItem
- Inherits:
-
Object
- Object
- Discordrb::Components::MediaItem
- Defined in:
- lib/discordrb/data/component.rb
Overview
Resolved metadata about a piece of media.
Instance Attribute Summary collapse
-
#attachment_id ⇒ Integer?
readonly
The ID of the uploaded attachment.
-
#content_type ⇒ String?
readonly
The content type of the media item.
-
#height ⇒ Integer?
readonly
The height of the media item.
-
#proxy_url ⇒ String?
readonly
The proxied URL to the media item.
-
#url ⇒ String
readonly
The URL to the media item.
-
#width ⇒ Integer?
readonly
The width of the media item.
Instance Attribute Details
#attachment_id ⇒ Integer? (readonly)
Returns the ID of the uploaded attachment. Only present
when the media item was uploaded via an attachment://<filename> reference.
466 467 468 |
# File 'lib/discordrb/data/component.rb', line 466 def @attachment_id end |
#content_type ⇒ String? (readonly)
Returns the content type of the media item.
462 463 464 |
# File 'lib/discordrb/data/component.rb', line 462 def content_type @content_type end |
#height ⇒ Integer? (readonly)
Returns the height of the media item.
456 457 458 |
# File 'lib/discordrb/data/component.rb', line 456 def height @height end |
#proxy_url ⇒ String? (readonly)
Returns the proxied URL to the media item.
459 460 461 |
# File 'lib/discordrb/data/component.rb', line 459 def proxy_url @proxy_url end |
#url ⇒ String (readonly)
Returns the URL to the media item.
450 451 452 |
# File 'lib/discordrb/data/component.rb', line 450 def url @url end |
#width ⇒ Integer? (readonly)
Returns the width of the media item.
453 454 455 |
# File 'lib/discordrb/data/component.rb', line 453 def width @width end |