Skip to content

$hasAttachment

$hasAttachment will return either true or false depending on if the message has an attachment.

Usage

$hasAttachment[messageId?;channelId?]

Parameters

FieldTypeDescriptionRequired
messageId?numberWhich hasAttachment argument will be returned, leave it empty to return the whole hasAttachment.false
channelId?numberWhich hasAttachment argument will be returned, leave it empty to return the whole hasAttachment.false

Example(s)

This will check if your message has an attachment attached:

1
client.command({
2
name: "hasAttachment",
3
code: `
4
Your message has an attachment?
5
--> $hasAttachment[$messageId;$channelId]
6
`
7
});