diff --git a/app/Http/Controllers/SakaiController.php b/app/Http/Controllers/SakaiController.php index 8bae2a09..47a55352 100755 --- a/app/Http/Controllers/SakaiController.php +++ b/app/Http/Controllers/SakaiController.php @@ -370,6 +370,8 @@ class SakaiController $s = "/box#country_add 冰岛"; + $s = "/box#country_test"; + // $s = "toWait 333333"; // $s = "no 2"; // diff --git a/app/Services/TG/Hook/Mod/Box.php b/app/Services/TG/Hook/Mod/Box.php index 96a1927f..2d37a289 100644 --- a/app/Services/TG/Hook/Mod/Box.php +++ b/app/Services/TG/Hook/Mod/Box.php @@ -9,6 +9,20 @@ use App\Models\BoxCountry as ModelBoxCountry; class Box extends Base { + public function country_test() + { + $this->oHttp->sToUrl = "https://".env("APP_WWW")."/api/freenode/country/rand"; + $this->oHttp->bIsJson = true; + $this->sMethod = "get"; + $r = $this->oHttp->send(); + + $r = json_decode($r, true); + + $r = $this->toJson($r); + + return $r; + } + public function country_hit($aParam) { $sName = $aParam["aArg"][1] ?? false;