Raw.messages.SendMessage

Raw.messages.SendMessage

Sends a message to a chat

messages.sendMessage#983f9745 flags:# no_webpage:flags.1?true silent:flags.5?true background:flags.6?true clear_draft:flags.7?true noforwards:flags.14?true update_stickersets_order:flags.15?true invert_media:flags.16?true peer:InputPeer reply_to:flags.0?InputReplyTo message:string random_id:long reply_markup:flags.2?ReplyMarkup entities:flags.3?Vector<MessageEntity> schedule_date:flags.10?int send_as:flags.13?InputPeer quick_reply_shortcut:flags.17?InputQuickReplyShortcut effect:flags.18?long = Updates;
export namespace Raw {
  export namespace messages {
    export class SendMessage {
      constructor(params: {
        noWebpage?: boolean;
        silent?: boolean;
        background?: boolean;
        clearDraft?: boolean;
        noforwards?: boolean;
        updateStickersetsOrder?: boolean;
        invertMedia?: boolean;
        peer: Raw.TypeInputPeer;
        replyTo?: Raw.TypeInputReplyTo;
        message: string;
        randomId: bigint;
        replyMarkup?: Raw.TypeReplyMarkup;
        entities?: Array<Raw.TypeMessageEntity>;
        scheduleDate?: number;
        sendAs?: Raw.TypeInputPeer;
        quickReplyShortcut?: Raw.TypeInputQuickReplyShortcut;
        effect?: bigint;
      }) {}
    }
  }
}

This is a function constructor, you can use it as method when call invoke

Layer: 185
Constructor ID: 0x983f9745

Property

  • noWebpage : boolean or undefined

    Set this flag to disable generation of the webpage preview

  • silent : boolean or undefined

    Send this message silently (no notifications for the receivers)

  • background : boolean or undefined

    Send this message as background message

  • clearDraft : boolean or undefined

    Clear the draft field

  • noforwards : boolean or undefined

    Only for bots, disallows forwarding and saving of the messages, even if the destination chat doesn’t have content protection enabled

  • updateStickersetsOrder : boolean or undefined

    Whether to move used stickersets to top, see here for more info on this flag

  • invertMedia : boolean or undefined

    If set, any eventual webpage preview will be shown on top of the message instead of at the bottom.

  • peer : Raw.TypeInputPeer

    The destination where the message will be sent

  • replyTo : Raw.TypeInputReplyTo or undefined

    If set, indicates that the message should be sent in reply to the specified message or story. also used to quote other messages.

  • message : string

    The message

  • randomId : bigint

    Unique client message id required to prevent message resending

  • replyMarkup : Raw.TypeReplyMarkup or undefined

    Reply markup for sending bot buttons

  • entities : Array of Raw.TypeMessageEntity or undefined

    Message entities for sending styled text

  • scheduleDate : number or undefined

    Scheduled message date for scheduled messages

  • sendAs : Raw.TypeInputPeer or undefined

    Send this message as the specified peer

  • quickReplyShortcut : Raw.TypeInputQuickReplyShortcut or undefined

    Add the message to the specified quick reply shortcut, instead.

  • effect : bigint or undefined

    Specifies a message effect to use for the message.

Results

Raw.TypeUpdates

Bots can use