Lists & Helpers
plural
$plural — Picks the singular or the plural form for a number
Picks the singular or the plural form for a number.
Syntax
$plural[count;singular;plural;(includeNumber)]
Parameters
- count (number, required) — The number.
- singular (text, required) — Used when the number is 1 (or -1).
- plural (text, required) — Used for every other number.
- includeNumber (
yesorno, optional) —yes(default) puts the number before the word.
Return Value
- string.
Usage
$plural[1;member;members] → "1 member"
$plural[5;member;members] → "5 members"
$plural[5;member;members;no] → "members"
Example
$sendMessage[$plural[1;member;members]]
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.