FormattedString
ref / parse-mode / FormattedString
Represents the formatted string after the parsing.
Implements
Constructors
ts
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
ts
text: string;
Plain text value for this Formatted
entities
ts
entities: MessageEntity[];
Format entities for this Formatted
Methods
toString
ts
toString();
Returns the string representation of this object