teleproto - v1.229.0
    Preparing search index...

    Interface SendFileInterface

    Interface for sending files to a chat.

    interface SendFileInterface {
        allowPaidFloodskip?: boolean;
        allowPaidStars?: BigInteger;
        attributes?: TypeDocumentAttribute[] | TypeDocumentAttribute[][];
        background?: boolean;
        buttons?: any;
        caption?: string | string[];
        clearDraft?: boolean;
        commentTo?: number | Message;
        effect?: BigInteger;
        file: FileLike | FileLike[];
        fileSize?: number;
        forceDocument?: boolean;
        formattingEntities?: TypeMessageEntity[];
        invertMedia?: boolean;
        noforwards?: boolean;
        nosoundVideo?: boolean;
        parseMode?: any;
        progressCallback?: OnProgress;
        quickReplyShortcut?: string | number | TypeInputQuickReplyShortcut;
        quoteEntities?: TypeMessageEntity[];
        quoteOffset?: number;
        quoteText?: string;
        replyTo?: TypeInputReplyTo | MessageIDLike;
        replyToPeerId?: EntityLike;
        scheduleDate?: number;
        scheduleRepeatPeriod?: number;
        sendAs?: EntityLike;
        silent?: boolean;
        spoiler?: boolean;
        suggestedPost?: SuggestedPost;
        supportsStreaming?: boolean;
        thumb?: FileLike;
        topMsgId?: number | Message;
        ttlSeconds?: number;
        updateStickersetsOrder?: boolean;
        videoCover?: TypeInputPhoto;
        videoNote?: boolean;
        videoTimestamp?: number;
        voiceNote?: boolean;
        workers?: number;
    }
    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.

    Optional attributes that override the inferred ones, like Api.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.

    caption?: string | string[]

    Optional caption for the sent media message. can be a list for albums

    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[]

    a file like object.

    • can be a localpath. the file name will be used.
    • can be a Buffer with a ".name" attribute to use as the file name.
    • can be an external direct URL. Telegram will download the file and send it.
    • can be an existing media from another message.
    • can be a handle to a file that was received by using TelegramClient.uploadFile
    • can be a list when using an album
    • can be Api.TypeInputMedia instance. For example if you want to send a dice you would use Api.InputMediaDice
    fileSize?: number

    The size of the file to be uploaded if it needs to be uploaded, which will be determined automatically if not specified.

    forceDocument?: boolean

    If left to false and the file is a path that ends with the extension of an image file or a video file, it will be sent as such. Otherwise always as a document.

    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.

    noforwards?: boolean
    nosoundVideo?: boolean

    If true, the uploaded video has no sound (sent as a silent video).

    parseMode?: any

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

    progressCallback?: OnProgress

    progress callback that will be called each time a new chunk is downloaded.

    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?: TypeInputReplyTo | MessageIDLike

    Same as replyTo from TelegramClient.sendMessage. 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.

    scheduleDate?: number

    If set, the file 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 scheduleDate.

    sendAs?: EntityLike

    Send the file 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.

    spoiler?: boolean

    Mark the media as spoiler (blurred until tapped).

    suggestedPost?: SuggestedPost

    Suggested-post metadata for direct-messages channels.

    supportsStreaming?: 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

    ttlSeconds?: number

    Self-destruct timer for the media, in seconds.

    updateStickersetsOrder?: boolean

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

    videoCover?: TypeInputPhoto

    Custom cover photo for the video.

    videoNote?: boolean

    If true the video will be sent as a video note, also known as a round video message.

    videoTimestamp?: number

    Start playback timestamp of the video, in seconds.

    voiceNote?: boolean

    If true the audio will be sent as a voice note.

    workers?: number

    How many workers to use to upload the file. anything above 16 is unstable.