teleproto - v1.229.0
    Preparing search index...

    Interface SendMessageParams

    Interface for sending a message. only message is required

    interface SendMessageParams {
        allowPaidFloodskip?: boolean;
        allowPaidStars?: BigInteger;
        attributes?: TypeDocumentAttribute[];
        background?: boolean;
        buttons?: any;
        clearDraft?: boolean;
        commentTo?: number | Message;
        effect?: BigInteger;
        file?: FileLike | FileLike[];
        forceDocument?: boolean;
        formattingEntities?: TypeMessageEntity[];
        invertMedia?: boolean;
        linkPreview?: boolean;
        message?: MessageLike;
        noforwards?: boolean;
        parseMode?: any;
        quickReplyShortcut?: string | number | TypeInputQuickReplyShortcut;
        quoteEntities?: TypeMessageEntity[];
        quoteOffset?: number;
        quoteText?: string;
        replyTo?: number | Message | TypeInputReplyTo;
        replyToPeerId?: EntityLike;
        richMessage?: TypeInputRichMessage;
        schedule?: number;
        scheduleRepeatPeriod?: number;
        sendAs?: EntityLike;
        silent?: boolean;
        suggestedPost?: SuggestedPost;
        supportStreaming?: boolean;
        thumb?: FileLike;
        topMsgId?: number | Message;
        updateStickersetsOrder?: boolean;
    }
    Index
    allowPaidFloodskip?: boolean

    Bots only: if set, allows sending up to 1000 messages per second past the flood limits, at a Stars cost.

    allowPaidStars?: BigInteger

    Stars to pay for sending a paid message, when the recipient charges for messages.

    attributes?: TypeDocumentAttribute[]

    Optional attributes that override the inferred ones, like DocumentAttributeFilename and so on.

    background?: boolean

    Send this message as a background message.

    buttons?: any

    The matrix (list of lists), row list or button to be shown after sending the message.
    This parameter will only work if you have signed in as a bot. You can also pass your own ReplyMarkup here.

    All the following limits apply together:

    • There can be 100 buttons at most (any more are ignored).
    • There can be 8 buttons per row at most (more are ignored).
    • The maximum callback data per button is 64 bytes.
    • The maximum data that can be embedded in total is just over 4KB, shared between inline callback data and text.
    clearDraft?: boolean

    Whether the existing draft should be cleared or not.

    commentTo?: number | Message

    Similar to replyTo, but replies in the linked group of a broadcast channel instead (effectively leaving a "comment to" the specified message).

    This parameter takes precedence over replyTo. If there is no linked chat, SG_ID_INVALID is thrown.

    effect?: BigInteger

    Message effect ID (animation/visual effect).

    file?: FileLike | FileLike[]

    Sends a message with a file attached (e.g. a photo, video, audio or document). The message may be empty.

    forceDocument?: boolean

    Whether to send the given file as a document or not.

    formattingEntities?: TypeMessageEntity[]

    A list of message formatting entities. When provided, the parseMode is ignored.

    invertMedia?: boolean

    If true, media will be shown below the text instead of above.

    linkPreview?: boolean

    Should the link preview be shown?

    message?: MessageLike

    The message to be sent, or another message object to resend as a copy.
    The maximum length for a message is 35,000 bytes or 4,096 characters.
    Longer messages will not be sliced automatically, and you should slice them manually if the text to send is longer than said length.

    noforwards?: boolean
    parseMode?: any

    See the parseMode property for allowed values. Markdown parsing will be used by default.

    quickReplyShortcut?: string | number | TypeInputQuickReplyShortcut

    Add the message to a quick-reply shortcut instead of sending it. A shortcut name, shortcut ID, or a raw Api.TypeInputQuickReplyShortcut.

    quoteEntities?: TypeMessageEntity[]

    Formatting entities of the quote. Offsets are relative to quoteText.

    quoteOffset?: number

    Offset of the quote within the original message (UTF-16 code units).

    quoteText?: string

    Quoted part of the message being replied to. Requires replyTo.

    replyTo?: number | Message | TypeInputReplyTo

    Whether to reply to a message or not. If an integer is provided, it should be the ID of the message that it should reply to.
    Also accepts a raw Api.TypeInputReplyTo for full control (stories, monoforums, todo items).

    replyToPeerId?: EntityLike

    Chat where the quoted message was sent, for quoting messages from other chats.

    richMessage?: TypeInputRichMessage

    Rich message content (Layer 228): tables, headings, lists, inline media.
    Build it with the Rich helpers — Rich.markdown("# hi"), Rich.html("<h1>hi</h1>") (server-side parsing), or Rich.blocks([...]). Only for plain text messages.

    schedule?: number

    If set, the message won't send immediately, and instead it will be scheduled to be automatically sent at a later time.

    scheduleRepeatPeriod?: number

    Repeat period (in seconds) for recurring scheduled messages. Requires schedule.

    sendAs?: EntityLike

    Send the message as a specific entity (channel/user).

    silent?: boolean

    Whether the message should notify people in a broadcast channel or not. Defaults to false, which means it will notify them. Set it to True to alter this behaviour.

    suggestedPost?: SuggestedPost

    Suggested-post metadata for direct-messages channels.

    supportStreaming?: boolean

    Whether the sent video supports streaming or not.
    Note that Telegram only recognizes as streamable some formats like MP4, and others like AVI or MKV will not work.
    You should convert these to MP4 before sending if you want them to be streamable. Unsupported formats will result in VideoContentTypeError.

    thumb?: FileLike

    Optional JPEG thumbnail (for documents). Telegram will ignore this parameter unless you pass a .jpg file!
    The file must also be small in dimensions and in disk size. Successful thumbnails were files below 20kB and 320x320px.
    Width/height and dimensions/size ratios may be important. For Telegram to accept a thumbnail, you must provide the dimensions of the underlying media through attributes: with DocumentAttributesVideo.

    topMsgId?: number | Message

    Used for threads to reply to a specific thread

    updateStickersetsOrder?: boolean

    Whether the order of the user's sticker sets should be updated when a sticker is sent.