Constructors
Properties
Optional
Readonly
_text
_text?: string
Accessors
kind
- get kind():
| "url"
| "bold"
| "email"
| "mention"
| "hashtag"
| "cashtag"
| "bot_command"
| "phone_number"
| "italic"
| "underline"
| "strikethrough"
| "spoiler"
| "code"
| "bank_card"
| "unknown"
| "blockquote"
| "pre"
| "text_link"
| "text_mention"
| "emoji" Returns
| "url"
| "bold"
| "email"
| "mention"
| "hashtag"
| "cashtag"
| "bot_command"
| "phone_number"
| "italic"
| "underline"
| "strikethrough"
| "spoiler"
| "code"
| "bank_card"
| "unknown"
| "blockquote"
| "pre"
| "text_link"
| "text_mention"
| "emoji"
length
- get length(): number
Returns number
offset
- get offset(): number
Returns number
text
- get text(): string
Returns string
Methods
is
- is<const T>(kind): this is MessageEntity & {
kind: T;
params:
| Extract<{
kind:
| "url"
| "bold"
| "email"
| "mention"
| "hashtag"
| "cashtag"
| "bot_command"
| "phone_number"
| "italic"
| "underline"
| "strikethrough"
| "spoiler"
| "code"
| "bank_card"
| "unknown";
}, {
kind: T;
}>
| Extract<{
collapsible: boolean;
kind: "blockquote";
}, {
kind: T;
}>
| Extract<{
kind: "pre";
language?: string;
}, {
kind: T;
}>
| Extract<{
kind: "text_link";
url: string;
}, {
kind: T;
}>
| Extract<{
kind: "text_mention";
userId: number;
}, {
kind: T;
}>
| Extract<{
emojiId: Long;
kind: "emoji";
}, {
kind: T;
}>;
} Type Parameters
- const T extends
| "url"
| "bold"
| "email"
| "mention"
| "hashtag"
| "cashtag"
| "bot_command"
| "phone_number"
| "italic"
| "underline"
| "strikethrough"
| "spoiler"
| "code"
| "bank_card"
| "unknown"
| "blockquote"
| "pre"
| "text_link"
| "text_mention"
| "emoji"
Returns this is MessageEntity & {
kind: T;
params:
| Extract<{
kind:
| "url"
| "bold"
| "email"
| "mention"
| "hashtag"
| "cashtag"
| "bot_command"
| "phone_number"
| "italic"
| "underline"
| "strikethrough"
| "spoiler"
| "code"
| "bank_card"
| "unknown";
}, {
kind: T;
}>
| Extract<{
collapsible: boolean;
kind: "blockquote";
}, {
kind: T;
}>
| Extract<{
kind: "pre";
language?: string;
}, {
kind: T;
}>
| Extract<{
kind: "text_link";
url: string;
}, {
kind: T;
}>
| Extract<{
kind: "text_mention";
userId: number;
}, {
kind: T;
}>
| Extract<{
emojiId: Long;
kind: "emoji";
}, {
kind: T;
}>;
}
One special entity in a text message (like mention, hashtag, URL, etc.)