FormattedString
ref / parse-mode / FormattedString
Represents the formatted string after the parsing.
Implements
Constructors
FormattedString(text: string, entities: MessageEntity[]);
Creates a new Formatted
. Useful for constructing a Formatted
from user’s formatted message
ts
// Constructing a new `FormattedString` from user's message
const userMsg = new FormattedString(ctx.message.text, ctx.entities());
Properties
text
text: string;
Plain text value for this Formatted
entities
entities: MessageEntity[];
Format entities for this Formatted
Methods
toString
toString();
Returns the string representation of this object