no message

This commit is contained in:
hellcat 2025-04-03 19:19:40 +08:00
parent a78674b4fe
commit 32a9271299
2 changed files with 15 additions and 1 deletions

View File

@ -35,7 +35,7 @@ $oHttp->aData = [
'type' => 'private' 'type' => 'private'
], ],
'date' => 1610000000, 'date' => 1610000000,
"text" => "\/duckList", "text" => "\/duckFind jp03",
] ]
]; ];

View File

@ -255,6 +255,20 @@ final class HookController
} }
// 查找duck
// /duckFind jp01
if (strpos($sText, '/duckFind') === 0 || strpos($sText, '\/duckFind') === 0) {
list($sCmd, $sCode) = explode(" ", $sText, 2);
$aData = Ducks::where('code', $sCode)->get()->toArray();
$this->sendMessage(json_encode($aData, JSON_PRETTY_PRINT));
Http::response(200, 'ok');
}
// 添加zhuanfa // 添加zhuanfa
// /zhuanfaAdd jp01 // /zhuanfaAdd jp01
if (strpos($sText, '/zhuanfaAdd') === 0 || strpos($sText, '\/zhuanfaAdd') === 0) { if (strpos($sText, '/zhuanfaAdd') === 0 || strpos($sText, '\/zhuanfaAdd') === 0) {