mirror of
https://github.com/pacnpal/markov-discord.git
synced 2025-12-22 03:41:05 -05:00
Avoid exactly reposting old messages.
npm audit
This commit is contained in:
@@ -60,7 +60,9 @@ const markovOpts: MarkovConstructorOptions = {
|
||||
|
||||
const markovGenerateOptions: MarkovGenerateOptions<MarkovDataCustom> = {
|
||||
filter: (result): boolean => {
|
||||
return result.score >= config.minScore;
|
||||
return (
|
||||
result.score >= config.minScore && !result.refs.some((ref) => ref.string === result.string)
|
||||
);
|
||||
},
|
||||
maxTries: config.maxTries,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user