seven 1 week ago
parent
commit
44a008c318

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

@@ -86,7 +86,7 @@ class Home extends Controller
         try {
             $telegram = new Api(config('services.telegram.token'));
             $commands = [
-                new BotCommand(['command' => 'start', 'description' => '🤖开始使用']),
+                new BotCommand(['command' => 'start', 'description' => lang('🤖开始使用')]),
                 // new BotCommand(['command' => 'room', 'description' => '🏠创建房间']),
                 // new BotCommand(['command' => 'online', 'description' => '🟢在线房间']),
                 // new BotCommand(['command' => 'topup', 'description' => '🔋账户管理']),

+ 3 - 0
app/Services/UserService.php

@@ -13,6 +13,7 @@ use Illuminate\Support\Collection;
 use Illuminate\Support\Facades\Cache;
 use Telegram\Bot\Api;
 use Telegram\Bot\Exceptions\TelegramSDKException;
+use App\Http\Controllers\api\Home;
 
 class UserService extends BaseService
 {
@@ -135,6 +136,8 @@ class UserService extends BaseService
 
     public static function setLanguage($chatId, $language): array
     {
+        (new Home)->setMyCommands();
+
         $userInfo = self::findOne(['member_id' => $chatId]);
         $userInfo->setLanguage($language);
         $userInfo->save();

+ 2 - 2
lang/en/messages.php

@@ -283,8 +283,8 @@ return [
     "赔率为0 庄家通吃 禁止投注!" => "Odds Are 0, Banker Takes All, Betting Forbidden!",
     "玩法未配置!" => "Gameplay Not Configured!",
     "消息格式错误!" => "Message Format Error!",
-    "任何疑问都可以联系唯一客服" => "For Any Questions, Contact the Sole Customer Service"
-
+    "任何疑问都可以联系唯一客服" => "For Any Questions, Contact the Sole Customer Service",
+    "🤖开始使用" => "🤖Get started",
 
 
 

+ 3 - 2
lang/vi/messages.php

@@ -283,8 +283,9 @@ return [
     "赔率为0 庄家通吃 禁止投注!" => "Tỷ lệ cược bằng 0, nhà cái thắng toàn bộ, cấm đặt cược!",
     "玩法未配置!" => "Cách chơi chưa được cấu hình!",
     "消息格式错误!" => "Định dạng tin nhắn sai!",
-    "任何疑问都可以联系唯一客服" => "Mọi thắc mắc có thể liên hệ bộ phận chăm sóc khách hàng duy nhất"
-
+    "任何疑问都可以联系唯一客服" => "Mọi thắc mắc có thể liên hệ bộ phận chăm sóc khách hàng duy nhất",
+    "🤖开始使用" => "🤖Bắt đầu sử dụng",
+    
 
 
 

+ 1 - 0
lang/zh/messages.php

@@ -284,6 +284,7 @@ return [
     "玩法未配置!" => "玩法未配置!",
     "消息格式错误!" => "消息格式错误!",
     "任何疑问都可以联系唯一客服" => "任何疑问都可以联系唯一客服",
+    "🤖开始使用" => "🤖开始使用",
 
 
 ];