Skip to content
Lists & Helpers containsAny

$containsAny — Tells whether the text contains at least one word of a list

Tells whether the text contains at least one word of a list. Replaces many `$checkContains` calls.

Syntax

$containsAny[text;wordList;(separator);(caseSensitive)]

Parameters

  • text (text, required) — The text to check.
  • wordList (text, required) — The words to look for.
  • separator (text, optional) — The text between two items. Default: ,. \n means a new line.
  • caseSensitive (yes or no, optional) — Default: no.

Return Value

  • true or false.

Usage

$containsAny[Hello World;foo,world] → "true"

Example

$sendMessage[$containsAny[Hello World;foo,world]]

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.