$onlyIfMessageContains
$onlyIfMessageContains
will check if the message contains the given text and if not return a error message.
Usage
Parameters
Field | Type | Description | Required |
---|---|---|---|
content | string | Message which should contain the given text. | true |
text | string | Text to check for in the message. | true |
error | string | Error to return. | true |
Example(s)
This will return the error message as “aoi.js” does not appear in “Hello!”: