File
Implementation of Discord’s File component as a Luau builder. The URL must be an attachment:// reference pointing to an uploaded file.
https://discord.com/developers/docs/components/reference#file
Summary
Properties
Section titled “Properties”The attachment URL (must use attachment://filename format).
spoiler
Section titled “spoiler”Whether the file is blurred as a spoiler.
Methods
Section titled “Methods”setFile
Section titled “setFile”File : setFile ( url ) -> File
Sets the attachment URL. Must use the attachment://filename format.
Parameters
| url: string |
Returns
| File |
setSpoiler
Section titled “setSpoiler”File : setSpoiler ( spoiler ) -> File
Sets whether the file is blurred as a spoiler.
Parameters
| spoiler: boolean |
Returns
| File |
File : build ( ) -> JSON
Responsible for building the File JSON that can be parsed by the Discord API.
Returns
| JSON |
Functions
Section titled “Functions”File . new ( resource ) -> File
Responsible for creating a new File.