$byteCount

Returns the amount of bytes in the provided “Text”.

Syntax

$byteCount[Text]

Recommendation

We recommend using this function to add limits to variables instead of $charCount[], since variables use bit limits, not characters!

$nomention
$onlyIf[$byteCount[$message]<500;Character limit has reached!]
New value for variable set!
$setUserVar[Text;$message]

How $onlyIf[], $message and $setUserVar[] works?

Parameters

  • Text (Type: String || Flag: Emptiable): The text to return the byte count for.

Example

$nomention
Your message has $byteCount[$message] bytes.
!example Hello World! Your message has 12 bytes. !example Привет Мир! Your message has 20 bytes. !example 你好世界! Your message has 15 bytes.

What is this?

How $message works?

🤖 Playground

Here you can understand how this function works.

Input:

$byteCount[]

Output:

Your message has 4 bytes