asMessageEntities

fun MessageText.asMessageEntities(): List<MessageEntity>

This message as kotlin-telegram-bot's entities.

Unlike :ktg, this client takes the Bot API's own shape — plain text plus offsets — so the whole mapping is a rename over io.github.youndie.telek.entities, which :core computes and :core tests, on the JVM and on native, without either client library present. The offsets are in UTF-16 code units, which is what Telegram counts and what Kotlin already indexes in.

public for the same reason :ktg's is: a bot reaching past telek for something telek does not model should be able to build the body with the same builder.