MessageAttachment
MessageAttachment
Represents a message attachment.
Kind: global class
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
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
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
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
Sets the attachment as a spoiler.
Kind: instance method of MessageAttachment
Returns: MessageAttachment
- This attachment.