3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-17 07:05:03 +00:00

plugins.censor: make token filter case-insensitive

This commit is contained in:
Miikka 2018-10-05 20:22:19 +03:00 committed by GitHub
parent 97f32c5f15
commit 11a4922344

View file

@ -145,7 +145,7 @@ export class CensorPlugin extends Plugin {
// Filter tokens
const blockedTokens = this.configValueForMsg(msg, "blocked_tokens") || [];
for (const token of blockedTokens) {
if (msg.content.includes(token)) {
if (msg.content.toLowerCase().includes(token.toLowerCase())) {
this.censorMessage(msg, `blocked token (\`${token}\`) found`);
return;
}