Functionalities
Other
$attachmentSize
Returns the size of the attachment file in the command with `3` options of formatting in bytes(`b`), kilobytes(`kb`) or megabytes(`mb`). Defaults to bytes(`b`).

FUNCTION USAGE

  • $attachmentSize
  • $attachmentSize[]
  • $attachmentSize[size]

Properties:

[] - Leave brackets empty to return the size of the attachment in bytes. Same as no brackets. size - Bot will return the size of the attachment in the format provided.

Example 1: Returns the file size in bytes.

1
bot.Command({
2
name: "size",
3
code: `
4
$attachmentSize bytes
5
`
6
})
Copied!

Example 2: Returns the file size in bytes

1
bot.Command({
2
name: "size",
3
code: `
4
$attachmentSize[b] bytes
5
`
6
})
Copied!

Example 3: Returns the file size in kilobytes

1
bot.Command({
2
name: "size",
3
code: `
4
$attachmentSize[kb] kilobytes
5
`
6
})
Copied!

Example 4: Returns the file size in megabytes

1
bot.Command({
2
name: "size",
3
code: `
4
$attachmentSize[mb] megabytes
5
`
6
})
Copied!
Last modified 5mo ago
Copy link
Contents
Properties: