Module telegram-bot-lua.methods.checklists
checklists API methods.
Functions
| api.add_checklist_tasks(chat_id, message_id, tasks) | add new tasks to an existing checklist message. |
| api.edit_checklist(chat_id, message_id, checklist_task_id, opts) | edit a task within an existing checklist message. |
| api.send_checklist(chat_id, checklist, opts) | send a checklist message to a chat. |
Functions
- api.add_checklist_tasks(chat_id, message_id, tasks)
-
add new tasks to an existing checklist message.
Parameters:
- chat_id string|number unique identifier for the target chat
- message_id number identifier of the checklist message
- tasks string|table JSON-serialised array of tasks or a table thereof
Returns:
- table|false true on success, or false on failure
- string|table the HTTP status or error details
- api.edit_checklist(chat_id, message_id, checklist_task_id, opts)
-
edit a task within an existing checklist message.
Parameters:
- chat_id string|number unique identifier for the target chat
- message_id number identifier of the checklist message
- checklist_task_id string identifier of the task to edit
- opts table optional parameters (text, is_completed)
Returns:
- table|false true on success, or false on failure
- string|table the HTTP status or error details
- api.send_checklist(chat_id, checklist, opts)
-
send a checklist message to a chat.
Parameters:
- chat_id string|number unique identifier for the target chat
- checklist string|table JSON-serialised checklist object or a table thereof
- opts table optional parameters (disablenotification, protectcontent, replyparameters, replymarkup)
Returns:
- table|false the sent message, or false on failure
- string|table the HTTP status or error details