File
A component for displaying file attachments in messages.
The File component is used to display references to files attached to your messages. It can show basic file information and provide access to the attached file.
Component Structure
A File is defined by its attachment URL and an optional flag to show metadata. The URL must reference an attachment in the message using the attachment://
protocol.
Creating a File
To create a file component, you instantiate the File
class with the attachment URL and optionally set showMetadata:
Usage Example
Here's how you might use File in a command:
Edit on GitHub
Last updated on