v5.0.0
$getAttachments
Gets attachment info of the provided Message.
With this function you can get information about message attachments, e.g. the name or url of an image.
Raw usage: $getAttachments[channelid;messageid;position;properties]

Properties:

  • name => the name of the attachment
  • id => the attachment ID
  • url => the url of tha attachment (e.g. image url)
  • size => the size of the file/image
  • width => the width of the attachment

Example Command:

1
bot.command({
2
name: "get-file",
3
code: `
4
$getAttachments[$channelID;838701159710720001;1;name]
5
`
6
})
Copied!
Example usage to get the image name of a message's first attachment.
Last modified 1mo ago
Copy link
Edit on GitHub