perf: 整理请求外部接口

This commit is contained in:
kuaifan
2023-03-09 17:33:39 +08:00
parent 6f2da3aa6d
commit 9dd27e9796
11 changed files with 416 additions and 205 deletions

View File

@@ -73,11 +73,11 @@ class BotReceiveMsgTask extends AbstractTask
// 签到机器人
if ($botUser->email === 'check-in@bot.system') {
if (preg_match("/<span[^>]*?data-quick-key=([\"'])(.*?)\\1[^>]*?>(.*?)<\/span>/is", $original, $match)) {
if ($match[2] === 'checkin') {
$text = "暂未开放手动签到。";
$text = UserBot::checkinBotQuickMsg($match[2], $msg->userid);
if ($text) {
WebSocketDialogMsg::sendMsg(null, $msg->dialog_id, 'text', ['text' => $text], $botUser->userid, false, false, true); // todo 未能在任务end事件来发送任务
return;
}
return;
}
}
// 管理机器人