How to get most recent messages from channel
I'm trying to have my bot get the most recent message of the channel, but it's returning undefined. How would i do that?
6 Replies
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
To get the most recent messages you can do
<Channel>.messages.fetch({limit: <However many messages you want to fetch>})
I did that, but when i console.log it, it is undefined.
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View