Class: Attachment
The base class for all structures.
Extends
Constructors
Constructor
new Attachment(
client,data):Attachment
Parameters
| Parameter | Type |
|---|---|
client | Client |
data | { } |
Returns
Attachment
Overrides
Properties
cachedAt
cachedAt:
number
Inherited from
client
protectedreadonlyclient:Client
Inherited from
contentType
contentType:
string
deleted?
optionaldeleted?:boolean
filename
filename:
string
id
id:
string
Overrides
messageId?
optionalmessageId?:string|null
metadata
metadata:
AttachmentMetadata
objectId?
optionalobjectId?:string|null
reported?
optionalreported?:boolean
serverId?
optionalserverId?:string|null
size
size:
number
tag
tag:
string
userId?
optionaluserId?:string|null
Accessors
isImage
Get Signature
get isImage():
boolean
Helper boolean to quickly check if it's an image
Returns
boolean
url
Get Signature
get url():
string
Automatically constructs the direct CDN URL for this file
Returns
string
Methods
_clone()
_clone():
this
Helper to quickly clone a structure
Returns
this
Inherited from
equals()
equals(
other):boolean
Compares this object with another to see if they represent the same entity.
Parameters
| Parameter | Type |
|---|---|
other | string | Base |
Returns
boolean
Inherited from
toString()
toString():
string
Returns the UUID string when the object is cast to a string.
Returns
string