Class: Discordrb::Components::File
- Inherits:
-
Object
- Object
- Discordrb::Components::File
- Defined in:
- lib/discordrb/data/component.rb
Overview
A component that allows you to display an attachment.
Instance Attribute Summary collapse
-
#id ⇒ Integer
readonly
The numeric identifier of the file.
-
#media ⇒ MediaItem
readonly
The unfurled media item of the file.
-
#name ⇒ String
readonly
The name of the file that was uploaded.
-
#size ⇒ Integer
readonly
The size of the file that was uploaded in bytes.
-
#spoiler ⇒ true, false
(also: #spoiler?)
readonly
Whether or not the file should be blurred out.
Instance Attribute Details
#id ⇒ Integer (readonly)
Returns the numeric identifier of the file.
419 420 421 |
# File 'lib/discordrb/data/component.rb', line 419 def id @id end |
#media ⇒ MediaItem (readonly)
Returns the unfurled media item of the file.
429 430 431 |
# File 'lib/discordrb/data/component.rb', line 429 def media @media end |
#name ⇒ String (readonly)
Returns the name of the file that was uploaded.
422 423 424 |
# File 'lib/discordrb/data/component.rb', line 422 def name @name end |
#size ⇒ Integer (readonly)
Returns the size of the file that was uploaded in bytes.
426 427 428 |
# File 'lib/discordrb/data/component.rb', line 426 def size @size end |
#spoiler ⇒ true, false (readonly) Also known as: spoiler?
Returns whether or not the file should be blurred out.
433 434 435 |
# File 'lib/discordrb/data/component.rb', line 433 def spoiler @spoiler end |