Documentation - v0.32.2
    Preparing search index...

    Type Alias MessageEntityParams

    MessageEntityParams:
        | {
            kind: | "mention"
            | "hashtag"
            | "cashtag"
            | "bot_command"
            | "url"
            | "email"
            | "phone_number"
            | "bold"
            | "italic"
            | "underline"
            | "strikethrough"
            | "spoiler"
            | "code"
            | "bank_card"
            | "diff_insert"
            | "diff_delete"
            | "unknown";
        }
        | { collapsible: boolean; kind: "blockquote" }
        | { kind: "pre"; language?: string }
        | { kind: "text_link"; url: string }
        | { kind: "text_mention"; userId: number }
        | { emojiId: tl.Long; kind: "emoji" }
        | { kind: "diff_replace"; oldText: string }
        | {
            date: Date;
            datePrecision: DateTimePartPrecision;
            kind: "date_time";
            relative: boolean;
            showDayOfWeek: boolean;
            timePrecision: DateTimePartPrecision;
        }

    Params of the entity. .kind can be:

    • 'mention': @username.
    • 'hashtag': #hashtag.
    • 'cashtag': $USD.
    • 'bot_command': /start.
    • 'url': https://example.com
    • 'email': [email protected].
    • '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.
    • 'date_time': A formatted date and/or time. .date contains the date, other fields describe the formatting.
    • 'diff_insert': A diff addition (e.g. in AI-edited text)
    • 'diff_delete': A diff deletion (e.g. in AI-edited text)
    • 'diff_replace': A diff replacement (e.g. in AI-edited text). .oldText contains the replaced text.

    Type Declaration

    • {
          kind:
              | "mention"
              | "hashtag"
              | "cashtag"
              | "bot_command"
              | "url"
              | "email"
              | "phone_number"
              | "bold"
              | "italic"
              | "underline"
              | "strikethrough"
              | "spoiler"
              | "code"
              | "bank_card"
              | "diff_insert"
              | "diff_delete"
              | "unknown";
      }
    • { collapsible: boolean; kind: "blockquote" }
    • { kind: "pre"; language?: string }
    • { kind: "text_link"; url: string }
    • { kind: "text_mention"; userId: number }
    • { emojiId: tl.Long; kind: "emoji" }
    • { kind: "diff_replace"; oldText: string }
    • {
          date: Date;
          datePrecision: DateTimePartPrecision;
          kind: "date_time";
          relative: boolean;
          showDayOfWeek: boolean;
          timePrecision: DateTimePartPrecision;
      }
      • date: Date
      • datePrecision: DateTimePartPrecision

        Precision with which the date should be displayed

      • kind: "date_time"
      • relative: boolean

        Whether the date should be displayed relative to the current time

      • showDayOfWeek: boolean

        Whether the day of the week should be displayed

      • timePrecision: DateTimePartPrecision

        Precision with which the time should be displayed