Constructor
new Attachment(client, data, options)
- Description:
Creates a structure for an attachment.
- Source:
- See:
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
client |
Client | The client instance. |
||||||
data |
Object | Attachment data from Discord. |
||||||
options |
Object | Additional options for the attachment. Properties
|
Members
(readonly) channelId :String
- Description:
The channel that this attachment belongs to.
- Source:
The channel that this attachment belongs to.
Type:
- String
(readonly) id :String
- Description:
The id of the attachment.
- Source:
The id of the attachment.
Type:
- String
(readonly) name :String
- Description:
The name of the file.
- Source:
The name of the file.
Type:
- String
(readonly) size :Number
- Description:
The size of the file.
- Source:
The size of the file.
Type:
- Number
(readonly) url :String
- Description:
The url to the file.
- Source:
The url to the file.
Type:
- String
Methods
toJSON(format) → {Object}
- Description:
Returns the JSON representation of this structure.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
format |
Number | The format to return the data in. |
Returns:
- Type
- Object
toString()
- Source: