Join multiple text parts with entities into a single text with entities, adjusting the entities' offsets accordingly.
List of text parts with entities
Delimiter to insert between parts
A single text with entities
const scoreboardText = joinTextWithEntities( apiResult.scoreboard.map((entry) => html`<b>${entry.name}</b>: ${entry.score}`), html`<br>`)await tg.sendText(chatId, html`<b>scoreboard:</b><br><br>${scoreboardText}`) Copy
const scoreboardText = joinTextWithEntities( apiResult.scoreboard.map((entry) => html`<b>${entry.name}</b>: ${entry.score}`), html`<br>`)await tg.sendText(chatId, html`<b>scoreboard:</b><br><br>${scoreboardText}`)
Join multiple text parts with entities into a single text with entities, adjusting the entities' offsets accordingly.