Functionalities
Other
Powered By GitBook
$addAttachment
Adds an attachment to your message via image URL. If the second field is left empty or non-existent, the function will give the image a randomized name.

FUNCTION USAGE

    $addAttachment[url]
    $addAttachment[url;name]

Properties:

url - Supply the url of the image attachment to be added to the message. name - Supply a new name to give to the image. If left empty or if 2nd field if non-existent, the function will give the image a randomized name.
This function will let you send attachment along with the bot message. for now you can only give link to send attachment, like you can give image link to send it as file.
Wrong link in $addAttachment will not respond.

Example 1: Function will return the author's avatar image with a randomized name.

1
bot.Command({
2
name: `attachment`,
3
code: `
4
$addAttachment[$authorAvatar]
5
`
6
})
Copied!

Example 2: Function will return the author's avatar image with the new name of the image to be the command author's username.

1
bot.Command({
2
name: `attachment`,
3
code: `
4
$addAttachment[$authorAvatar;$username]
5
`
6
})
Copied!
Last modified 4mo ago
Copy link