Attachment
dc_attachment
Represents an attachment from a message or slash command.
Queryable properties #
Property | Type | Description |
---|---|---|
message |
Message, Null | The message of the attachment. Returns null if it's not a message attachment. |
file_name |
String | The name of the attachment. |
size |
Number | The size as the number of bytes of the attached file. |
url |
String | The URL of the attachment. |
proxy_url |
String | The proxy URL of the file. |
is_image |
Boolean | Whether if this file is an image. |
width |
Number, Null | The width of the attached image. Returns null if the attachment is not an image. |
height |
Number, Null | The height of the attached image. Returns null if the attachment is not an image. |
is_spoiler |
Boolean | Whether if this file is marked as a spoiler. |
download |
String | Downloads the file's bytes as a string.1 Throws an exception on failure. |
-
Querying this property can freeze the game. Query it in a
task
to avoid freezing your game. ↩