From 9ca89872dc9b099561231d55fb8da6c581ac5c4a Mon Sep 17 00:00:00 2001 From: hellcat <> Date: Thu, 3 Jul 2025 20:00:38 +0800 Subject: [PATCH] no message --- app/Services/TG/Hook/Mod/Box.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/app/Services/TG/Hook/Mod/Box.php b/app/Services/TG/Hook/Mod/Box.php index 7aa07acc..96a1927f 100644 --- a/app/Services/TG/Hook/Mod/Box.php +++ b/app/Services/TG/Hook/Mod/Box.php @@ -9,6 +9,23 @@ use App\Models\BoxCountry as ModelBoxCountry; class Box extends Base { + public function country_hit($aParam) + { + $sName = $aParam["aArg"][1] ?? false; + + if (!$sName) { + return "需要arg[1],name。"; + } + + $oCountry = ModelBoxCountry::where("name", $sName)->get(); + + if(!$oCountry) { + return "不存在".$sName; + } + + return $this->toJson($oCountry); + } + public function country_list() { $oCountry = ModelBoxCountry::all()->toArray();