mirror of
				https://github.com/v2board/v2board.git
				synced 2025-11-04 19:31:45 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			22 lines
		
	
	
		
			600 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			600 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						||
 | 
						||
namespace App\Plugins\Telegram\Commands;
 | 
						||
 | 
						||
use App\Models\User;
 | 
						||
use App\Plugins\Telegram\Telegram;
 | 
						||
 | 
						||
class GetLatestUrl extends Telegram {
 | 
						||
    public $command = '/getlatesturl';
 | 
						||
    public $description = '将Telegram账号绑定到网站';
 | 
						||
 | 
						||
    public function handle($message, $match = []) {
 | 
						||
        $telegramService = $this->telegramService;
 | 
						||
        $text = sprintf(
 | 
						||
            "%s的最新网址是:%s",
 | 
						||
            config('v2board.app_name', 'V2Board'),
 | 
						||
            config('v2board.app_url')
 | 
						||
        );
 | 
						||
        $telegramService->sendMessage($message->chat_id, $text, 'markdown');
 | 
						||
    }
 | 
						||
}
 |