Skip to content

$interactionAttachment

$interactionAttachment returns the URL of the attachment option’s value.

Usage

$interactionAttachment[option]

Parameters

FieldTypeDescriptionRequired
optionstringThe name of the attachment option.true

Example(s)

This will return the URL of the attached file in the attachment option:

1
$createApplicationCommand[$guildID;exampleslash;Simple example slash command.;true;true;slash;[{
2
"name": "attachment",
3
"description": "Example attachment option.",
4
"required": true,
5
"type": 11
6
}]]
1
client.interactionCommand({
2
name: "exampleslash",
3
prototype: "slash",
4
code: `$interactionReply[Your attachment: $interactionAttachment[attachment]]`
5
});