Skip to main content

messages.appendTodoList

Appends one or more items to a todo list ».

func (c *Client) MessagesAppendTodoList(ctx context.Context, request *MessagesAppendTodoListRequest) (UpdatesClass, error)

Calling this method

client.Run(ctx, func(ctx context.Context) error {
api := client.API()

res, err := api.MessagesAppendTodoList(ctx, &tg.MessagesAppendTodoListRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // UpdatesClass
return nil
})

Parameters

NameTypeRequiredDescription
PeerInputPeerClassyesPeer where the todo list was posted.
MsgIDintyesID of the message with the todo list.
List[]TodoItemyesItems to append.

Returns

UpdatesClass

Possible errors

CodeTypeDescription
400MESSAGE_ID_INVALIDThe provided message id is invalid.
400PEER_ID_INVALIDThe provided peer id is invalid.
400TODO_ITEM_DUPLICATEDuplicate checklist items detected.
400TODO_NOT_MODIFIEDNo todo items were specified, so no changes were made to the todo list.

References