Type Alias MessageEntityParams

MessageEntityParams:
    | {
        kind:
            | "mention"
            | "hashtag"
            | "cashtag"
            | "bot_command"
            | "url"
            | "email"
            | "phone_number"
            | "bold"
            | "italic"
            | "underline"
            | "strikethrough"
            | "spoiler"
            | "code"
            | "bank_card"
            | "unknown";
    }
    | {
        collapsible: boolean;
        kind: "blockquote";
    }
    | {
        kind: "pre";
        language?: string;
    }
    | {
        kind: "text_link";
        url: string;
    }
    | {
        kind: "text_mention";
        userId: number;
    }
    | {
        emojiId: tl.Long;
        kind: "emoji";
    }

Params of the entity. .kind can be:

  • 'mention': @username.
  • 'hashtag': #hashtag.
  • 'cashtag': $USD.
  • 'bot_command': /start.
  • 'url': https://example.com
  • 'email': example@example.com.
  • 'phone_number': +42000.
  • 'bold': bold text.
  • 'italic': italic text.
  • 'underline': underlined text.
  • 'strikethrough': strikethrough text.
  • 'code': monospaced string.
  • 'pre': monospaced block. .language contains the language of the block (if available).
  • 'text_link': for clickable text URLs.
  • 'text_mention': for user mention by name. .userId contains the ID of the mentioned user.
  • 'blockquote': A blockquote
  • 'emoji': A custom emoji. .emojiId contains the emoji ID.