Skip to content

Commit 1ae6929

Browse files
authored
Merge pull request #162 from destinygg/fix/aegissingle-fix
fix: aegissingle not cleansing normal nukes anymore
2 parents 328e86e + 018bbe3 commit 1ae6929

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/commands/implementations/aegis.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ function aegisSingle(input, services) {
2424
const matched = /(?:\/(.*)\/)?(.*)/.exec(input);
2525
const aegisWord = _.get(matched, 2).toLowerCase();
2626
const aegisRegex = _.get(matched, 1, '');
27-
const wordToUnnuke = aegisRegex === '' ? aegisWord : (new RegExp(aegisRegex, 'i')).toString();
27+
const wordToUnnuke =
28+
aegisRegex === ''
29+
? new RegExp(`\\b${aegisWord}\\b`, 'i').toString()
30+
: new RegExp(aegisRegex, 'i').toString();
2831
const usersToUnmute = services.punishmentCache.getNukedUsersForPhrase(wordToUnnuke);
2932
services.punishmentCache.cleanseSingleNuke(wordToUnnuke);
3033
if (usersToUnmute.length === 0) {

0 commit comments

Comments
 (0)