no message

This commit is contained in:
hellcat 2025-04-01 20:39:16 +08:00
parent c9907ceac1
commit 9f78265046
2 changed files with 32 additions and 10 deletions

View File

@ -35,10 +35,39 @@ $oHttp->aData = [
'type' => 'private' 'type' => 'private'
], ],
'date' => 1610000000, 'date' => 1610000000,
'text' => '/reportUser_day_3' "text" => "\/userFind 1",
] ]
]; ];
//{
// "update_id": 761180998,
// "message": {
// "message_id": 1159,
// "from": {
// "id": 7740568271,
// "is_bot": false,
// "first_name": "sakai",
// "username": "gemcode_business",
// "language_code": "zh-hans"
// },
// "chat": {
// "id": -4668400285,
// "title": "FUUU",
// "type": "group",
// "all_members_are_administrators": true
// },
// "date": 1743503707,
// "text": "\/userFind 1",
// "entities": [
// {
// "offset": 0,
// "length": 9,
// "type": "bot_command"
// }
// ]
// }
//}
$r = $oHttp->send(); $r = $oHttp->send();
var_dump($r); var_dump($r);

View File

@ -100,16 +100,9 @@ final class HookController
} }
// 查找用户 // 查找用户
if (strpos($sText, '/userFind') === 0) { if (strpos($sText, '/userFind') === 0 || strpos($sText, '\/userFind') === 0) {
// Ticket::where("id", $iTicketId)->first()->toArray(); list(, $iUserId) = explode(" ", $sText, 2);
// $iTicketId = $this->trimText($sText, '/ticketFind');
//
// $aTicket = Ticket::where("id", $iTicketId)->first()->toArray();
$iUserId = (int) $this->trimText($sText, '/userFind');
$aUser = User::find($iUserId)->toArray(); $aUser = User::find($iUserId)->toArray();