seven 3 dienas atpakaļ
vecāks
revīzija
31e4e96526
2 mainītis faili ar 7 papildinājumiem un 1 dzēšanām
  1. 5 1
      app/Http/Controllers/api/TelegramWebHook.php
  2. 2 0
      sql/sql_prod.sql

+ 5 - 1
app/Http/Controllers/api/TelegramWebHook.php

@@ -23,6 +23,7 @@ use Illuminate\Support\Facades\DB;
 use Telegram\Bot\Api;
 use Telegram\Bot\Exceptions\TelegramSDKException;
 use Illuminate\Support\Facades\Log;
+use App\Models\Config;
 
 class TelegramWebHook extends Controller
 {
@@ -201,9 +202,12 @@ class TelegramWebHook extends Controller
                         break;
                     case "投注大群":
                         Util::delCache($chatId);
+
+                        $bettingGroup = Config::where('field', 'betting_group')->first()->val;
+
                         $text = "👇👇👇点击下方按钮进群投注👇👇👇\n";
                         $keyboard = [];
-                        $keyboard[] = [['text' => '✅ 投注群', 'callback_data' => "", 'url' => "https://t.me/+8jhXv9Eb-oRmZDY1"]];
+                        $keyboard[] = [['text' => '✅ 投注群', 'callback_data' => "", 'url' => "https://t.me/{$bettingGroup}"]];
                         $this->telegram->sendMessage([
                             'chat_id' => $chatId,
                             'text' => $text,

+ 2 - 0
sql/sql_prod.sql

@@ -85,6 +85,8 @@ INSERT INTO `bot_config` VALUES (5, 'receiving_address', 'Trftghhnnbg6775tghy678
 INSERT INTO `bot_config` VALUES (6, 'receiving_type', '2', '2025-07-07 17:48:06', '2025-07-07 17:48:06', '收款方式 1-自动 2-手动');
 INSERT INTO `bot_config` VALUES (7, 'channel_message', '{\"chatId\":\"oooluckychannel\",\"image\":\"https://baidu.com/logo.jpg\",\"text\":\"这是文本内容\",\"button\":[[{\"text\":\"开云注册送138\",\"url\":\"https://baidu.com\"}],[{\"text\":\"世界杯招代理\",\"url\":\"https://baidu.com\"},{\"text\":\"米兰体育官网\",\"url\":\"https://baidu.com\"}]]}', '2025-07-07 17:48:06', '2025-07-07 17:48:06', '频道消息JSON');
 
+INSERT INTO `bot_config` VALUES (8, 'betting_group', '+8jhXv9Eb-oRmZDY1', '2025-07-07 17:48:06', '2025-07-07 17:48:06', '投注群');
+
 
 -- ----------------------------
 -- Table structure for bot_messages