messages.SendMessage#

class pyrogram.raw.functions.messages.SendMessage#

Sends a message to a chat.

Details:
  • Layer: 158

  • ID: 1CC20387

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 on this flag.

  • reply_to_msg_id (int 32-bit, optional) – N/A

  • top_msg_id (int 32-bit, optional) – N/A

  • 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.

Returns:

Updates