Skip to content
Files fileCount

$fileCount[]

$fileCount returns the number of files of the bot. With a prefix, only the files whose path starts with it are counted.

Syntax

bdfd
$fileCount[(prefix)]

Parameters

Parameter Description
prefix Optional. Beginning of the path, for example uploads/.

Return value

A number. The count stops at 1000.

Examples

$if[$fileCount[uploads/]>=200]
  The gallery is full.
$endif

In JavaScript: await bc.files.count('uploads/').

Try it

Paste an example into the playground to preview its message (functions that act on Discord are not run), or build the same thing with blocks.