Bug Fix
This commit is contained in:
@@ -83,12 +83,14 @@ client.on(Events.MessageCreate, async (message) => {
|
|||||||
//currentCount++;
|
//currentCount++;
|
||||||
//message.channel.setTopic(currentCount + " Pings | Schreibt \"Ping\" & der Bot schreibt \"Pong\"");
|
//message.channel.setTopic(currentCount + " Pings | Schreibt \"Ping\" & der Bot schreibt \"Pong\"");
|
||||||
|
|
||||||
|
const channel = message.channel;
|
||||||
|
|
||||||
let messageCount = 0;
|
let messageCount = 0;
|
||||||
let lastMessageId;
|
let lastMessageId;
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
// Fetch messages in batches of 100
|
// Fetch messages in batches of 100
|
||||||
const options = { limit: 100 };
|
const options = { limit: 1000 };
|
||||||
if (lastMessageId) {
|
if (lastMessageId) {
|
||||||
options.before = lastMessageId;
|
options.before = lastMessageId;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user