$endsWith

Returns whether the provided text's last argument is 'query'.

Usage

$endsWith[text;query]

This function has two params.

Param
Description
Type
Required

text

The text that may end with 'query'.

String

Yes

query

The word that 'text' may end with.

String

Yes

triangle-exclamation

Examples

Example #1

bot.commands.add({
    type: "basicCommand",
    name: "example",
    code: `$endsWith[Hello World;World]` //Returns true
})

Example #2

bot.commands.add({
    type: "basicCommand",
    name: "example",
    code: `$endsWith[Hello World;Hello]` //Returns false
})

Last updated

Was this helpful?