fix BotCommand regex match argument bug

This commit is contained in:
crazywhalecc
2023-02-12 19:22:06 +08:00
committed by Jerry
parent 7cfdbee843
commit 817b81f900

View File

@@ -464,6 +464,7 @@ class OneBot12Adapter extends ZMPlugin
} }
// 测试 regex // 测试 regex
if ($v->regex !== '' && preg_match('/' . $v->regex . '/u', $full_str, $match) !== 0) { if ($v->regex !== '' && preg_match('/' . $v->regex . '/u', $full_str, $match) !== 0) {
array_shift($match);
return [$v, $match, $full_str]; return [$v, $match, $full_str];
} }
// 测试 start_with // 测试 start_with