$onlyIfMessageContains
$onlyIfMessageContains
will check if the message contains the given text and if not return an error message.
Usage
$onlyIfMessageContains[content;...text;error]
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!”:
1client.command({2 name: "onlyIfMessageContains",3 code: `4 Ok.5 $onlyIfMessageContains[Hello!;aoi.js;Couldn't find that word!]6 `7});