diff options
Diffstat (limited to 'src/framework/standard/create_help_command.rs')
| -rw-r--r-- | src/framework/standard/create_help_command.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/framework/standard/create_help_command.rs b/src/framework/standard/create_help_command.rs index b1fd8ec..b8eb57a 100644 --- a/src/framework/standard/create_help_command.rs +++ b/src/framework/standard/create_help_command.rs @@ -218,6 +218,13 @@ impl CreateHelpCommand { self } + /// Sets the maximum Levenshtein-distance to find similar commands. + pub fn max_levenshtein_distance(mut self, distance: usize) -> Self { + self.0.max_levenshtein_distance = distance; + + self + } + fn produce_strike_text(&self, dm_or_guild: &str) -> Option<String> { let mut strike_text = String::from("~~`Strikethrough commands`~~ are unavailable because they"); let mut is_any_option_strike = false; |