Skip to content

danog\MadelineProto\EventHandler\Message\Rich\Text\BotCommand: A /command detected by Telegram (sent as plain text, and detected again unless entity detection is skipped).

Back to index

Author: Daniil Gentili daniil@daniil.it

A /command detected by Telegram (sent as plain text, and detected again unless entity detection is skipped).

Properties

  • $text: danog\MadelineProto\EventHandler\Message\Rich\RichText The styled text

Method list:

Methods:

__construct(\danog\MadelineProto\EventHandler\Message\Rich\RichText|string $text)

Parameters:

  • $text: \danog\MadelineProto\EventHandler\Message\Rich\RichText|string

See also:

  • [\danog\MadelineProto\EventHandler\Message\Rich\RichText: Styled text of a rich message: a tree of plain texts, styles, links and so on.](../../../../../../danog/MadelineProto/EventHandler/Message/Rich/RichText.html)

from(\danog\MadelineProto\EventHandler\Message\Rich\RichText|string $text): \danog\MadelineProto\EventHandler\Message\Rich\RichText

Get a rich text from a rich text or a plain string.

Parameters:

  • $text: \danog\MadelineProto\EventHandler\Message\Rich\RichText|string

getText(): string

Get the plain text version of the rich text.

getEntities(): list<\danog\MadelineProto\EventHandler\Message\Entities\MessageEntity>

Get the entities for the styles of the plain text version of the rich text.

See also:

getHTML(bool $allowTelegramTags = false): string

Get an HTML version of the rich text.

Parameters:

  • $allowTelegramTags: bool Whether to allow telegram-specific tags like tg-spoiler, tg-emoji, mention links and so on…

Generated by danog/phpdoc