I've tried channel.fetchMessages()
, but the limit is 100 messages. It's for a bot supposed to simulate users using machine learning.
CodePudding user response:
The limit of returned messages is
100
, with the default being50
. See the actual API docs for details.
By default, you get the most recent messages, but you can specify additional query criteria when fetching messages. You'll need to repeat your fetch requests, adjusting the query criteria each time, in order to collect successively older messages. After each request, you can analyze what you've collected so far to determine if you need to keep fetching or not.
Beware of the rate limits.