messages.SendMessage

class pyrogram.raw.functions.messages.SendMessage

Sends a message to a chat

Details:
  • Layer: 194

  • ID: 983F9745

Parameters:
  • peer (InputPeer) – The destination where the message will be sent

  • message (str) – The message

  • random_id (int 64-bit) – Unique client message ID required to prevent message resending

  • no_webpage (bool, optional) – Set this flag to disable generation of the webpage preview

  • silent (bool, optional) – Send this message silently (no notifications for the receivers)

  • background (bool, optional) – Send this message as background message

  • clear_draft (bool, optional) – Clear the draft field

  • noforwards (bool, optional) – Only for bots, disallows forwarding and saving of the messages, even if the destination chat doesn’t have content protection enabled

  • update_stickersets_order (bool, optional) – Whether to move used stickersets to top, see here for more info on this flag »

  • invert_media (bool, optional) – If set, any eventual webpage preview will be shown on top of the message instead of at the bottom.

  • allow_paid_floodskip (bool, optional) – N/A

  • reply_to (InputReplyTo, optional) – If set, indicates that the message should be sent in reply to the specified message or story. Also used to quote other messages.

  • reply_markup (ReplyMarkup, optional) – Reply markup for sending bot buttons

  • entities (List of MessageEntity, optional) – Message entities for sending styled text

  • schedule_date (int 32-bit, optional) – Scheduled message date for scheduled messages

  • send_as (InputPeer, optional) – Send this message as the specified peer

  • quick_reply_shortcut (InputQuickReplyShortcut, optional)

  • effect (int 64-bit, optional)

Returns:

Updates