MessageAttachment
Represents a message attachment.
Kind: global class
new MessageAttachment(url, data, filename)
Section titled “new MessageAttachment(url, data, filename)”Constructs a new MessageAttachment object.
| Param | Type | Description |
|---|---|---|
| url | string | The URL of the attachment. |
| data | Object | Additional data for the attachment. |
| filename | string | The name of the file. |
messageAttachment.setFile(file) ⇒ MessageAttachment
Section titled “messageAttachment.setFile(file) ⇒ MessageAttachment”Sets the file for the attachment.
Kind: instance method of MessageAttachment
Returns: MessageAttachment - This attachment.
| Param | Type | Description |
|---|---|---|
| file | BufferResolvable | Stream | The file to attach. |
messageAttachment.setFilename(filename) ⇒ MessageAttachment
Section titled “messageAttachment.setFilename(filename) ⇒ MessageAttachment”Sets the name of the file.
Kind: instance method of MessageAttachment
Returns: MessageAttachment - This attachment.
| Param | Type | Description |
|---|---|---|
| filename | string | The name of the file. |
messageAttachment.setDescription(description) ⇒ MessageAttachment
Section titled “messageAttachment.setDescription(description) ⇒ MessageAttachment”Sets the description of the attachment.
Kind: instance method of MessageAttachment
Returns: MessageAttachment - This attachment.
| Param | Type | Description |
|---|---|---|
| description | string | The description of the attachment. |
messageAttachment.setSpoiler() ⇒ MessageAttachment
Section titled “messageAttachment.setSpoiler() ⇒ MessageAttachment”Sets the attachment as a spoiler.
Kind: instance method of MessageAttachment
Returns: MessageAttachment - This attachment.