Fetch more than 100 messages from channel

Hello, it is possible to fetch than more 100 messages from channel?
10 Replies
d.js toolkit
d.js toolkit2y ago
• What's your exact discord.js npm list discord.js and node node -v version? • Post the full error stack trace, not just the top part! • Show your code! • Explain what exactly your issue is. • Not a discord.js issue? Check out #useful-servers.
Kevinnnn
Kevinnnn2y ago
the limit is 100 messages per fetch without any date constraints
wisienka
wisienkaOP2y ago
so must fetch 100 messages and fetch more 100 starting at last messages from previous fetch? i think good
Kevinnnn
Kevinnnn2y ago
basically, yes
wisienka
wisienkaOP2y ago
i going to try, when will i have problem i gonna ask ok solved but i have another question it is possible to get picture attach from json? because after fetch i have only id of attachment
Kevinnnn
Kevinnnn2y ago
<Message>.attachments returns a collection of attachment objects, and it has the url to the attachment
d.js docs
d.js docs2y ago
Documentation suggestion for @wisienak:property Message#attachments A collection of attachments in the message - e.g. Pictures - mapped by their ids. (more...)property Attachment#url The URL to this attachment
wisienka
wisienkaOP2y ago
but i store messages in json and there's attachment and it have id i gonna show you wait
wisienka
wisienkaOP2y ago
Kevinnnn
Kevinnnn2y ago
however youre compressing the message, youre flattening the attachments in your message the Message object provided by djs has a collection of attachments, and each attachment has a url property
Want results from more Discord servers?
Add your server