class
MessageMedia
Source: structures/
Media attached to a message
Method
new MessageMedia(mimetype, data, filename)
Parameters
| Name | Type | Optional | Description |
|---|---|---|---|
|
mimetype |
|
|
MIME type of the attachment |
|
data |
|
|
Base64-encoded data of the file |
|
filename |
|
|
Document file name Value can be null. |
Properties
data string
Base64 encoded data that represents the file
filename nullable string
Name of the file (for documents)
mimetype string
MIME type of the attachment
Method
static
fromFilePath(filePath) → MessageMedia
Creates a MessageMedia instance from a local file path
Parameter
| Name | Type | Optional | Description |
|---|---|---|---|
|
filePath |
string |
|
- Returns