diff --git a/lib/commands/implementations/aegis.js b/lib/commands/implementations/aegis.js index b56f6b8..c034cdb 100644 --- a/lib/commands/implementations/aegis.js +++ b/lib/commands/implementations/aegis.js @@ -24,7 +24,10 @@ function aegisSingle(input, services) { const matched = /(?:\/(.*)\/)?(.*)/.exec(input); const aegisWord = _.get(matched, 2).toLowerCase(); const aegisRegex = _.get(matched, 1, ''); - const wordToUnnuke = aegisRegex === '' ? aegisWord : (new RegExp(aegisRegex, 'i')).toString(); + const wordToUnnuke = + aegisRegex === '' + ? new RegExp(`\\b${aegisWord}\\b`, 'i').toString() + : new RegExp(aegisRegex, 'i').toString(); const usersToUnmute = services.punishmentCache.getNukedUsersForPhrase(wordToUnnuke); services.punishmentCache.cleanseSingleNuke(wordToUnnuke); if (usersToUnmute.length === 0) {