mirror of
https://github.com/pacnpal/markov-discord.git
synced 2025-12-20 11:01:04 -05:00
Clarify error while training on bad channel permissions
This commit is contained in:
10
src/index.ts
10
src/index.ts
@@ -314,8 +314,10 @@ async function saveGuildMessageHistory(
|
|||||||
limit: PAGE_SIZE,
|
limit: PAGE_SIZE,
|
||||||
});
|
});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
L.error(`Error retreiving messages before ${oldestMessageID}`);
|
|
||||||
L.error(err);
|
L.error(err);
|
||||||
|
L.error(
|
||||||
|
`Error retreiving messages before ${oldestMessageID} in channel ${channel.name}. This is probably a permissions issue.`
|
||||||
|
);
|
||||||
break; // Give up on this channel
|
break; // Give up on this channel
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -341,8 +343,10 @@ async function saveGuildMessageHistory(
|
|||||||
limit: PAGE_SIZE,
|
limit: PAGE_SIZE,
|
||||||
});
|
});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
L.error(`Error retreiving thread messages before ${oldestThreadMessageID}`);
|
|
||||||
L.error(err);
|
L.error(err);
|
||||||
|
L.error(
|
||||||
|
`Error retreiving thread messages before ${oldestThreadMessageID} in thread ${threadChannel.name}. This is probably a permissions issue.`
|
||||||
|
);
|
||||||
break; // Give up on this thread
|
break; // Give up on this thread
|
||||||
}
|
}
|
||||||
L.trace(
|
L.trace(
|
||||||
@@ -351,7 +355,7 @@ async function saveGuildMessageHistory(
|
|||||||
);
|
);
|
||||||
const lastThreadMessage = threadBatchMessages.last();
|
const lastThreadMessage = threadBatchMessages.last();
|
||||||
allBatchMessages = allBatchMessages.concat(threadBatchMessages); // Add the thread messages to this message batch to be included in later processing
|
allBatchMessages = allBatchMessages.concat(threadBatchMessages); // Add the thread messages to this message batch to be included in later processing
|
||||||
if (!lastThreadMessage || threadBatchMessages.size < PAGE_SIZE) {
|
if (!lastThreadMessage?.id || threadBatchMessages.size < PAGE_SIZE) {
|
||||||
keepGoingThread = false;
|
keepGoingThread = false;
|
||||||
} else {
|
} else {
|
||||||
oldestThreadMessageID = lastThreadMessage.id;
|
oldestThreadMessageID = lastThreadMessage.id;
|
||||||
|
|||||||
Reference in New Issue
Block a user