seven 1 өдөр өмнө
parent
commit
fcc9c467f4

+ 3 - 0
app/Http/Controllers/api/TelegramWebHook.php

@@ -25,6 +25,7 @@ use Telegram\Bot\Api;
 use Telegram\Bot\Exceptions\TelegramSDKException;
 use Illuminate\Support\Facades\Log;
 use App\Models\Config;
+use App\Services\GameplayRuleService;
 
 class TelegramWebHook extends Controller
 {
@@ -229,6 +230,8 @@ class TelegramWebHook extends Controller
                         ]);
                         break;
                     default:
+
+                        $gameplay = GameplayRuleService::bettingRuleVerify($text);
                         $this->telegram->sendMessage([
                             'chat_id' => $chatId,
                             'text' => '‼️‼️未知命令,请点击下方菜单按钮选择功能'

+ 5 - 1
app/Services/GameplayRuleService.php

@@ -164,5 +164,9 @@ class GameplayRuleService extends BaseService
         Cache::forget($cacheKey);
     }
 
-    
+    public static function bettingRuleVerify($input)
+    {
+        $result = self::enum()::validateInput($input);
+        return $result;
+    }
 }