We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 328e86e + 018bbe3 commit 1ae6929Copy full SHA for 1ae6929
lib/commands/implementations/aegis.js
@@ -24,7 +24,10 @@ function aegisSingle(input, services) {
24
const matched = /(?:\/(.*)\/)?(.*)/.exec(input);
25
const aegisWord = _.get(matched, 2).toLowerCase();
26
const aegisRegex = _.get(matched, 1, '');
27
- const wordToUnnuke = aegisRegex === '' ? aegisWord : (new RegExp(aegisRegex, 'i')).toString();
+ const wordToUnnuke =
28
+ aegisRegex === ''
29
+ ? new RegExp(`\\b${aegisWord}\\b`, 'i').toString()
30
+ : new RegExp(aegisRegex, 'i').toString();
31
const usersToUnmute = services.punishmentCache.getNukedUsersForPhrase(wordToUnnuke);
32
services.punishmentCache.cleanseSingleNuke(wordToUnnuke);
33
if (usersToUnmute.length === 0) {
0 commit comments