diff --git a/eigenbot.js b/eigenbot.js index 1843ab1..411ec93 100644 --- a/eigenbot.js +++ b/eigenbot.js @@ -95,8 +95,11 @@ async function onMessage (msg) { return url.split('/')[4] })) } - for (const issueKey of new Set(matches)) { - await respondWithIssue(msg, issueKey) + const keys = new Set(matches) + if (!config.maxBugsPerMessage || keys.size <= config.maxBugsPerMessage) { + for (const issueKey of keys) { + await respondWithIssue(msg, issueKey) + } } } diff --git a/sample-config.json b/sample-config.json index fb6633d..b4aa9b2 100644 --- a/sample-config.json +++ b/sample-config.json @@ -17,6 +17,7 @@ "Invalid": 9441545, //For Invalid, Duplicate, Incomplete, and Cannot Reproduce resolutions "Working": 16777215 //For Won't Fix and Works as Intended resolutions }, + "maxBugsPerMessage": , // Number of bug ids allowed per message "modlog": "", // channel id where to log deletions "cleanup-streams": { "twitchApiClientId": "", // Twitch API client id (required to check which streams are live)