Closed skzhengkai closed 3 months ago
The core library
Message.channel.messages.fetch is not working. No errors are thrown, it simply seems to never finish.
client.on('messageCreate', async (message) => { if (message.content.startsWith('!getlast')) { const channel = message.channel; console.log(`channel: ${channel.name}`) const messages = await message.channel.messages.fetch({ limit: 20 }); console.log(`messages: ${messages.size}`) const filteredMessages = messages.filter(msg => !msg.author.bot).reverse(); console.log(filteredMessages) const formattedMessages = filteredMessages.map((msg, index) => `${index + 1}. ${msg.author.username} (${msg.createdAt.toLocaleString()}): ${msg.content}`); console.log(`\`\`\`\n${formattedMessages.join('\n')}\n\`\`\``); } });
2.15.1
18.12.1
No response
Medium (should be fixed soon)
The issue was using Replit IP.
Which package has the bugs?
The core library
Issue description
Message.channel.messages.fetch is not working. No errors are thrown, it simply seems to never finish.
Code sample
Package version
2.15.1
Node.js version
18.12.1
Operating system
No response
Priority this issue should have
Medium (should be fixed soon)
Checklist
Additional Information
No response