Skip to content
Modules moduleList

$moduleList

$moduleList returns the modules installed on the bot, sorted by identifier and joined by the separator.

Syntax

$moduleList[separator;filter;format]

Parameters

Parameter Description
separator Optional. Text between the items. Default ,.
filter Optional. all (default), enabled (not turned off) or configurable (with at least one server setting).
format Optional. id (default) or name (the name in the language of the person, then of the bot).

Return value

  • Type: String
  • The identifiers or names joined by the separator, empty when no module matches.

JavaScript

bc.module.list({filter, format}) returns an array of strings.

Behavior

  • An unknown filter or format raises an error that lists the accepted values.
  • Names follow the language of the person who used the command, then the default language of the bot, then English.

Examples

$title[Modules]
$description[$moduleList[\n;all;name]]

Notes

  • Everything is read from the modules installed on the bot, so a module added later is covered with no change to your script.
  • See the guide Module and command functions.

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.