aboutsummaryrefslogtreecommitdiffstats
path: root/bot/utils/commands.py
diff options
context:
space:
mode:
authorGravatar Izan <[email protected]>2022-09-06 08:29:27 -0400
committerGravatar Izan <[email protected]>2022-09-06 08:29:27 -0400
commit3bcb96a128fd3ef9343a6df914019e95294974b3 (patch)
treece72231fd2be7c943a4fd6042040fe1dbd9ebc58 /bot/utils/commands.py
parentRemove call to on_command_error that shouldn't be there. (diff)
Fix typehint
Diffstat (limited to 'bot/utils/commands.py')
-rw-r--r--bot/utils/commands.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/bot/utils/commands.py b/bot/utils/commands.py
index 7c04a25a..2058507e 100644
--- a/bot/utils/commands.py
+++ b/bot/utils/commands.py
@@ -1,11 +1,7 @@
-from typing import Optional
-
from rapidfuzz import process
-def get_command_suggestions(
- all_commands: list[str], query: str, *, cutoff: int = 60, limit: int = 3
-) -> Optional[list]:
+def get_command_suggestions(all_commands: list[str], query: str, *, cutoff: int = 60, limit: int = 3) -> list[str]:
"""Get similar command names."""
results = process.extract(query, all_commands, score_cutoff=cutoff, limit=limit)
return [result[0] for result in results]