From 4086b4f06f34aaeae3132755b17c2884ad5f8d9a Mon Sep 17 00:00:00 2001 From: Lea Date: Sat, 8 Apr 2023 21:38:46 +0200 Subject: [PATCH 1/2] filter strictness should be `HARD` by default --- bot/src/bot/commands/configuration/botctl.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot/src/bot/commands/configuration/botctl.ts b/bot/src/bot/commands/configuration/botctl.ts index 2ab11aa..e478f1d 100644 --- a/bot/src/bot/commands/configuration/botctl.ts +++ b/bot/src/bot/commands/configuration/botctl.ts @@ -162,7 +162,7 @@ export default { break; } case 'add': { - let strictness: any = 'SOFT'; + let strictness: any = 'HARD'; if (['soft', 'hard', 'strict'].includes(args[0].toLowerCase())) { strictness = args.shift()!.toUpperCase() as any; } @@ -313,7 +313,7 @@ export default { `### This command allows you to configure a manual word filter.\n` + `- **${DEFAULT_PREFIX}botctl filter enable** - Enable the word filter.\n` + `- **${DEFAULT_PREFIX}botctl filter disable** - Disable the word filter.\n` + - `- **${DEFAULT_PREFIX}botctl filter add [soft|hard] [word]** - Add a word to the list. If omitted, defaults to 'soft'.\n` + + `- **${DEFAULT_PREFIX}botctl filter add [soft|hard] [word]** - Add a word to the list. If omitted, defaults to 'hard'.\n` + `- **${DEFAULT_PREFIX}botctl filter remove** - Remove a word from the list.\n` + `- **${DEFAULT_PREFIX}botctl filter show** - Send the current filter list.\n` + `- **${DEFAULT_PREFIX}botctl filter message [message]** - Set the message sent when a message is matched.\n` + From 9ef6a59000d09210cdb16d58059cd4d65c4b6342 Mon Sep 17 00:00:00 2001 From: Lea Date: Sat, 8 Apr 2023 21:50:22 +0200 Subject: [PATCH 2/2] add link to documentation for word filter --- bot/src/bot/commands/configuration/botctl.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bot/src/bot/commands/configuration/botctl.ts b/bot/src/bot/commands/configuration/botctl.ts index e478f1d..e3504bc 100644 --- a/bot/src/bot/commands/configuration/botctl.ts +++ b/bot/src/bot/commands/configuration/botctl.ts @@ -313,12 +313,13 @@ export default { `### This command allows you to configure a manual word filter.\n` + `- **${DEFAULT_PREFIX}botctl filter enable** - Enable the word filter.\n` + `- **${DEFAULT_PREFIX}botctl filter disable** - Disable the word filter.\n` + - `- **${DEFAULT_PREFIX}botctl filter add [soft|hard] [word]** - Add a word to the list. If omitted, defaults to 'hard'.\n` + + `- **${DEFAULT_PREFIX}botctl filter add [soft|hard|strict] [word]** - Add a word to the list. If omitted, defaults to 'hard'.\n` + `- **${DEFAULT_PREFIX}botctl filter remove** - Remove a word from the list.\n` + `- **${DEFAULT_PREFIX}botctl filter show** - Send the current filter list.\n` + `- **${DEFAULT_PREFIX}botctl filter message [message]** - Set the message sent when a message is matched.\n` + `- **${DEFAULT_PREFIX}botctl filter action [log|delete|warn]** - Configure the action taken on filtered messages.\n` + - `- **${DEFAULT_PREFIX}botctl filter test [phrase]** - Test whether a phrase matches your word list.\n`, + `- **${DEFAULT_PREFIX}botctl filter test [phrase]** - Test whether a phrase matches your word list.\n` + + `More documentation can be found [here](https://github.com/janderedev/automod/wiki/Word-Filter).`, 'Word filter', ), embed(