From 8cc247b65354ea18947ebca01e192d0b6b58f634 Mon Sep 17 00:00:00 2001 From: LinusX Date: Sat, 15 Jun 2024 02:16:54 +0800 Subject: [PATCH] =?UTF-8?q?[feat]=20=E6=96=B0=E5=A2=9Etelegram=E6=9C=BA?= =?UTF-8?q?=E5=99=A8=E4=BA=BA/start=E6=8C=87=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Plugins/Telegram/Commands/GetLatestUrl.php | 2 +- app/Plugins/Telegram/Commands/Start.php | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 app/Plugins/Telegram/Commands/Start.php diff --git a/app/Plugins/Telegram/Commands/GetLatestUrl.php b/app/Plugins/Telegram/Commands/GetLatestUrl.php index 0d34b77..44afdfb 100644 --- a/app/Plugins/Telegram/Commands/GetLatestUrl.php +++ b/app/Plugins/Telegram/Commands/GetLatestUrl.php @@ -7,7 +7,7 @@ use App\Plugins\Telegram\Telegram; class GetLatestUrl extends Telegram { public $command = '/getlatesturl'; - public $description = '将Telegram账号绑定到网站'; + public $description = '获取网站最新网址'; public function handle($message, $match = []) { $telegramService = $this->telegramService; diff --git a/app/Plugins/Telegram/Commands/Start.php b/app/Plugins/Telegram/Commands/Start.php new file mode 100644 index 0000000..add3db0 --- /dev/null +++ b/app/Plugins/Telegram/Commands/Start.php @@ -0,0 +1,17 @@ +is_private) return; + $telegramService = $this->telegramService; + $text = "/start 显示所有可用指令\n /bind+空格+订阅链接,将telegram绑定至账户\n /traffic 获取当前使用流量 \n /getlatesturl 获取网站最新网址 \n /unbind 解绑telegram账户"; + $telegramService->sendMessage($message->chat_id, $text, 'markdown'); + } +}