| description | Returns the size Of file in The project In the Provided Unit |
|---|
With this function you can check the size of the given file in your bot's host.
Raw usage: $fileSize[file path;unit]
b=> byteskb=> kilobytes (1,000 bytes)mb=> megabytes (1,000,000 bytes)gb=> gigabytes (1,000,000,000 bytes)
Using a file from the main folder to return it's size in kilobytes:
bot.command({
name: "file-size",
code: `
$fileSize[server.js;kb]
`
})
Using a file from another folder to return it's size in megabytes:
bot.command({
name: "file-size",
code: `
$fileSize[commands/moderation/anti_invite.js;mb]
`
})
{% hint style="info" %} To use a file that's inside a folder, use it's path in the file path field like in the example above. {% endhint %}
