send_checklist()#

Client.send_checklist()#

Send a new checklist.

Usable by Users Bots
Parameters:
  • chat_id (int | str) – Unique identifier (int) or username (str) of the target chat. For your personal cloud (Saved Messages) you can simply use “me” or “self”. For a contact that exists in your Telegram address book you can use his phone number (str).

  • checklist (InputChecklist) – Checklist to send.

  • disable_notification (bool, optional) – Sends the message silently. Users will receive a notification with no sound.

  • protect_content (bool, optional) – Protects the contents of the sent message from forwarding and saving.

  • message_effect_id (int, optional) – Unique identifier of the message effect. For private chats only.

  • message_thread_id (int, optional) – Unique identifier for the target message thread (topic) of the forum.

  • reply_parameters (ReplyParameters, optional) – Describes reply parameters for the message that is being sent.

  • schedule_date (datetime, optional) – Date when the message will be automatically sent.

  • business_connection_id (str, optional) – Unique identifier of the business connection on behalf of which the message will be sent.

  • paid_message_star_count (int, optional) – The number of Telegram Stars the user agreed to pay to send the messages.

  • reply_markup (InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply, optional) – Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.

  • caption (str, optional) – Media caption, 0-1024 characters.

  • parse_mode (ParseMode, optional) – By default, texts are parsed using both Markdown and HTML styles. You can combine both syntaxes together.

  • caption_entities (List of MessageEntity) – List of special entities that appear in the caption, which can be specified instead of parse_mode.

Returns:

Message – On success, the sent checklist message is returned.

Example

await client.send_checklist(
    chat_id=message.chat.id,
    checklist=types.InputChecklist(
        title="To Do",
        tasks=[
            types.InputChecklistTask(id=1, text="Task 1"),
            types.InputChecklistTask(id=2, text="Task 2"),
            types.InputChecklistTask(id=3, text="Task 3"),
        ]
    )
)