From 116ed896ab0eb61f1159d9990bd0e18f409c90ea Mon Sep 17 00:00:00 2001 From: ErrorNoInternet Date: Sun, 5 Jan 2025 16:48:46 -0500 Subject: [PATCH] fix(commands/utils): fix partial exact matching play & playing --- commands/utils.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/commands/utils.py b/commands/utils.py index 9a7dc25..01308d7 100644 --- a/commands/utils.py +++ b/commands/utils.py @@ -25,6 +25,14 @@ def match_token(token: str) -> list[Command]: if token.lower() == "r": return [Command.RELOAD] + if exact_match := list( + filter( + lambda command: command.value == token.lower(), + Command.__members__.values(), + ) + ): + return exact_match + return list( filter( lambda command: command.value.startswith(token.lower()),