A way to get all messages in thread by id? #9370
-
Hi, is there any way to get all messages whit user and avatar in thread by id? i using const channel = await client.channels.fetch("id"); and returned all content in this channel thread but only topics not messages... |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
not really through a single fetch (all the time) |
Beta Was this translation helpful? Give feedback.
not really through a single fetch (all the time)
your
channel.messages.fetch({limit:100})
is going to fetch the last 100 messages (as the max limit is 100), so to fetch more, you need to fetch more and do some pagination (using the before and after parameter)if there is a huge number of messages, it can turn into api spam real quick