TelegramEntityParser
Parser for nested entities of Telegram Bot API
Install / Use
/learn @davtur19/TelegramEntityParserREADME
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
node-connect
353.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
111.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
353.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
353.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
