From b851f1207a0852e89a9441529c89a9f9e9a34f25 Mon Sep 17 00:00:00 2001 From: Tokumeikoi Date: Mon, 25 May 2020 16:41:05 +0800 Subject: [PATCH] update telegram --- app/Http/Controllers/Guest/TelegramController.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Guest/TelegramController.php b/app/Http/Controllers/Guest/TelegramController.php index 59dcdffb..727aa542 100644 --- a/app/Http/Controllers/Guest/TelegramController.php +++ b/app/Http/Controllers/Guest/TelegramController.php @@ -82,7 +82,8 @@ class TelegramController extends Controller if (!$msg->is_private) return; $telegramService = new TelegramService(); $commands = [ - '/bind 订阅地址 - 绑定你的' . config('v2board.app_name', 'V2Board') . '账号' + '/bind 订阅地址 - 绑定你的' . config('v2board.app_name', 'V2Board') . '账号', + '/traffic 查询流量' ]; $text = implode(PHP_EOL, $commands); $telegramService->sendMessage($msg->chat_id, "你可以使用以下命令进行操作:\n\n$text", 'markdown'); @@ -101,7 +102,7 @@ class TelegramController extends Controller $up = Helper::trafficConvert($user->u); $down = Helper::trafficConvert($user->d); $remaining = Helper::trafficConvert($user->transfer_enable - ($user->u + $user->d)); - $text = "🚥流量查询———————————————\n总流量:`{$transferEnable}`\n已用上行:`{$up}`\n已用下行:`{$down}`\n剩余流量:`{$remaining}`"; + $text = "🚥流量查询\n———————————————\n计划流量:`{$transferEnable}`\n已用上行:`{$up}`\n已用下行:`{$down}`\n剩余流量:`{$remaining}`"; $telegramService = new TelegramService(); $telegramService->sendMessage($msg->chat_id, $text, 'markdown'); }