Aquí está mi consulta
const messages = await Thread.findOne({_id: threadId}, {messages: {$slice: [10, -10]}})Este es el error:
MongoError: First argument to $slice must be an array, but is of type: intObviamente, estoy pasando una matriz a $slice, entonces, ¿por qué recibo este error?