Class: OnyxCord::Components::File
- Inherits:
-
Object
- Object
- OnyxCord::Components::File
- Defined in:
- lib/onyxcord/models/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.
425 426 427 |
# File 'lib/onyxcord/models/component.rb', line 425 def id @id end |
#media ⇒ MediaItem (readonly)
Returns the unfurled media item of the file.
435 436 437 |
# File 'lib/onyxcord/models/component.rb', line 435 def media @media end |
#name ⇒ String (readonly)
Returns the name of the file that was uploaded.
428 429 430 |
# File 'lib/onyxcord/models/component.rb', line 428 def name @name end |
#size ⇒ Integer (readonly)
Returns the size of the file that was uploaded in bytes.
432 433 434 |
# File 'lib/onyxcord/models/component.rb', line 432 def size @size end |
#spoiler ⇒ true, false (readonly) Also known as: spoiler?
Returns whether or not the file should be blurred out.
439 440 441 |
# File 'lib/onyxcord/models/component.rb', line 439 def spoiler @spoiler end |