fix: revert "feat: 兼容指令名和第一个参数之间没有空格的情况 (#2650)" for command issue

This reverts commit 9bfa726107.
This commit is contained in:
Soulter
2025-09-14 19:31:15 +08:00
parent 7740e1e131
commit 39a7a0d960
+2 -9
View File
@@ -153,17 +153,10 @@ class CommandFilter(HandlerFilter):
_full = f"{parent_command_name} {candidate}"
else:
_full = candidate
if message_str == _full:
# 完全等于命令名 → 没参数
message_str = ""
if message_str.startswith(f"{_full} ") or message_str == _full:
message_str = message_str[len(_full) :].strip()
ok = True
break
elif message_str.startswith(_full):
# 命令名后面无论是空格还是直接连参数都可以
message_str = message_str[len(_full) :].lstrip()
ok = True
break
if not ok:
return False