seven преди 5 дни
родител
ревизия
83e1c7d6b6
променени са 2 файла, в които са добавени 7 реда и са изтрити 6 реда
  1. 1 1
      app/Http/Controllers/api/TelegramWebHook.php
  2. 6 5
      app/Services/BetService.php

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

@@ -240,7 +240,7 @@ class TelegramWebHook extends Controller
                 // 今日汇率
                 if ($data === 'todayExchangeRate@@rate') {
                     $res = BetService::todayExchangeRate($chatId);
-                    $telegram->sendMessage($res);
+                    // $telegram->sendMessage($res);
                 }
 
                 //选择投注记录

+ 6 - 5
app/Services/BetService.php

@@ -665,11 +665,12 @@ class BetService extends BaseService
     {
         $exchangeRate = Config::where('field', 'exchange_rate_rmb')->first()->val;
         $text = "今日汇率:1美元 = {$exchangeRate}人民币 \n";
-        $botMsg = [
-            'chat_id' => "@{$chatId}",
-            'text' => $text
-        ];
-        return $botMsg;
+        // $botMsg = [
+        //     'chat_id' => "@{$chatId}",
+        //     'text' => $text
+        // ];
+        self::sendMessage($chatId, $text);
+        // return $botMsg;
     }