Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A program to parse and decode formatted part of the Telegram message text with UTF8 support.

License

Notifications You must be signed in to change notification settings

BaseMax/TelegramEntitiesParser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

20 Commits

Repository files navigation

Telegram Entities Parser

A program to parse and decode formatted part of the Telegram message text with UTF8 support.

Message Entity Types

  • url
  • mention (@username)
  • text_mention (for users without usernames)
  • hashtag
  • cashtag
  • bot_command
  • email
  • phone_number
  • bold (bold text)
  • italic (italic text)
  • code (monowidth string)
  • pre (monowidth block)
  • text_link (for clickable text URLs)

Example

Input

✳️✳️✳️ Help ✳️✳️✳️
Uname Max
Uname requested help
https://t.me/c/11/13

Detect

---> Uname
---> Max
---> Uname
---> https://t.me/c/11/13

Output

✳️✳️✳️ Help ✳️✳️✳️
<a href="https://t.me/Uname">Uname</a> <a href="https://t.me/max">Max</a> 
<a href="https://t.me/Uname">Uname</a> requested help
<a href="https://t.me/c/11/13">https://t.me/c/11/13</a>

Message Entity

Telegram Bot API

Releases

No releases published

Packages

No packages published

Languages

AltStyle によって変換されたページ (->オリジナル) /