GetLatestUrl.php 600 B

123456789101112131415161718192021
  1. <?php
  2. namespace App\Plugins\Telegram\Commands;
  3. use App\Models\User;
  4. use App\Plugins\Telegram\Telegram;
  5. class GetLatestUrl extends Telegram {
  6. public $command = '/getlatesturl';
  7. public $description = '将Telegram账号绑定到网站';
  8. public function handle($message, $match = []) {
  9. $telegramService = $this->telegramService;
  10. $text = sprintf(
  11. "%s的最新网址是:%s",
  12. config('v2board.app_name', 'V2Board'),
  13. config('v2board.app_url')
  14. );
  15. $telegramService->sendMessage($message->chat_id, $text, 'markdown');
  16. }
  17. }