SkillAgentSearch skills...

TelegramEntityParser

Parser for nested entities of Telegram Bot API

Install / Use

/learn @davtur19/TelegramEntityParser
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

TelegramEntityParser

Parser for nested entities of Telegram Bot API

Requirements

PHP 7 and mbstring extension

It does not work properly on Windows!

Usage

Use entitiesToHtml($text, $entities);

You can use text and entity directly from https://core.telegram.org/bots/api#message

Notes

mb_substr() is very slow but it is necessary for parsing, for a faster mb_substr() you can try using this.

Using both UTF-16LE and UTF-16BE is necessary for correct parsing, don't ask me why, it just works.

The NULL character is used internally in the functions, in any case Telegram will never send you that character.

Special thanks to giuseppeM99

Related Skills

View on GitHub
GitHub Stars11
CategoryDevelopment
Updated2y ago
Forks1

Languages

PHP

Security Score

75/100

Audited on Dec 22, 2023

No findings