no message

This commit is contained in:
hellcat 2025-04-07 21:10:34 +08:00
parent 0a14b576a4
commit 4e08742745
2 changed files with 19 additions and 1 deletions

View File

@ -35,7 +35,7 @@ $oHttp->aData = [
'type' => 'private'
],
'date' => 1610000000,
"text" => "\/duckOption|width_reset_day|7",
"text" => "\/nodeList",
]
];

View File

@ -125,6 +125,7 @@ final class HookController
'节点like' => 'nodeLike#duck jp02',
'node删除' => 'nodeDel 18',
'node复制' => 'nodeCopy 18',
'节点列表简洁'=> 'nodeList',
];
$this->sendMessage(json_encode($aCmdList, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT));
@ -314,6 +315,23 @@ final class HookController
}
// 节点列表(简洁)
// /nodeList
if (strpos($sText, '/nodeList') === 0 || strpos($sText, '\/nodeList') === 0) {
$aNodeList = Node::where('type', 1)->get()->toArray();
$sMsg = '';
foreach ($aNodeList as $row) {
$sMsg .= '【 '.$row['name'].' 】id:'.$row['id'].', duck:'.$row['duck_code'].', zf:'.$row['zhuanfa_code'].', sort:'.$row['sort'];
}
$this->sendMessage($sMsg);
Http::response(200, 'ok');
}
// 添加duck
// /duckAdd jp01
if (strpos($sText, '/duckAdd') === 0 || strpos($sText, '\/duckAdd') === 0) {