Skip to content

suggestions

Command suggestion utilities.

Classes:

Classes

CommandSuggester

Python
CommandSuggester()

Handles command suggestions for CommandNotFound errors.

Initialize the command suggester.

Methods:

Functions

suggest_command async
Python
suggest_command(ctx: Context[Tux]) -> list[str] | None

Find similar command names using Levenshtein distance.

Returns:

  • list[str] | None

    List of suggested command names, or None if no suggestions found.

handle_command_not_found async
Python
handle_command_not_found(ctx: Context[Tux]) -> None

Handle CommandNotFound with suggestions.