is there a way i can get all the messages in a channel and get the message content of each message?

title
7 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Zickles
Zickles2y ago
14.7.1 and 17.8.0
space
space2y ago
No, you can't.
Zickles
Zickles2y ago
really its not possible? then what does channel.messages.fetch do? less than 100 i couldnt figure out how to put them all into an array do you know how i could do that? i want to access the content of each message
d.js docs
d.js docs2y ago
Converting a Collection to an array You only need to convert it to an array if you need the index of an entry: • Iteration (looping) is possible with for...of over Collection#values or forEach • You can transform a Collection to an array with Collection#map • If you need indices, you can get the array using [...collection.values()]
Zickles
Zickles2y ago
oh well i did not know that lol ty is there something wrong with how im doing thins or am i just using .map() wrong? channel.messages.fetch({ limit: 100 }).map(message => message.content);
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View