v5.0.0
$stringStartsWith
Determines whether given message starts by another text or not.
This function will return true or false depending if given text starts with the requested content.
Raw usage: $stringStartsWith[message;text]
Example usage to return true as result:
1
bot.command({
2
name: "startswith",
3
code: `Does \`Hey, how are you?\` start with Hey?
4
$stringStartsWith[Hey, how are you?;Hey] // returns true
5
`
6
});
Copied!
1
bot.command({
2
name: "startswith",
3
code: `Does \`Hey, how are you?\` start with Hello?
4
$stringStartsWith[Hey, how are you?;Hey] // returns false
5
`
6
});
Copied!
Of course you can use $message as definition of the message field to check if the command's message starts with a special content.
Last modified 1mo ago
Copy link
Edit on GitHub