From df25bb7da8f692bd3fe194c8ec55fbbf731cec0a Mon Sep 17 00:00:00 2001 From: 1Kill2Steal <171241044+1Git2Clone@users.noreply.github.com> Date: Sun, 22 Dec 2024 00:48:48 +0200 Subject: [PATCH] Made the bot dumber It's too smart with a tolerance of 2 changes --- src/utils/string_manipulation.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/string_manipulation.rs b/src/utils/string_manipulation.rs index c2e7349..9681427 100644 --- a/src/utils/string_manipulation.rs +++ b/src/utils/string_manipulation.rs @@ -81,7 +81,7 @@ pub fn levenshtein_core<'a>(msg: &'a str, commands: &'a [String]) -> Levenshtein if cmd == lower { return data; } - if strsim::levenshtein(&cmd, &lower) <= 2 { + if strsim::levenshtein(&cmd, &lower) <= 1 { tmp.push(cmd); } }