Function: isImageAttachment()
isImageAttachment(
attachment
:Attachment
):boolean
Checks whether an attachment is an image attachment, this is done so by checking the content type of the attachment,
if the content type starts with image/
and the attachment has dimensions defined, it is considered an image
attachment.
Parameters
Parameter | Type | Description |
---|---|---|
attachment | Attachment | The attachment to check |
Returns
boolean
Whether the attachment is an image attachment
Since
7.3.0
Defined in
projects/utilities/packages/discord.js-utilities/src/lib/type-guards.ts:345