message.channel.messages.fetch({
limit: 100 // количество сообщений
}).then(async messages => {
let finalArray = [];
const putInArray = async (data) => finalArray.push(data);
for (const message of messages.array().reverse()) await putInArray(`${message.content}`);
console.log(finalArray); // ['value1', 'value2', 'valueN']
});
limit
.