SendMessage

class pyrogram.raw.functions.messages.SendMessage

Sends a message to a chat.

Details
  • Layer: 126

  • ID: 0x520c3870

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.

  • reply_to_msg_id (int 32-bit, optional) – The message ID to which this message will reply to.

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

Returns

Updates – Object which is perceived by the client without a call on its part when an event occurs.