2023-11-17 01:44:01 -05:00
|
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Plugins\Telegram\Commands;
|
|
|
|
|
|
|
|
|
|
use App\Models\User;
|
|
|
|
|
use App\Plugins\Telegram\Telegram;
|
|
|
|
|
|
|
|
|
|
class GetLatestUrl extends Telegram {
|
|
|
|
|
public $command = '/getlatesturl';
|
2024-06-14 14:16:54 -04:00
|
|
|
|
public $description = '获取网站最新网址';
|
2023-11-17 01:44:01 -05:00
|
|
|
|
|
|
|
|
|
public function handle($message, $match = []) {
|
|
|
|
|
$telegramService = $this->telegramService;
|
|
|
|
|
$text = sprintf(
|
|
|
|
|
"%s的最新网址是:%s",
|
|
|
|
|
admin_setting('app_name', 'XBoard'),
|
|
|
|
|
admin_setting('app_url')
|
|
|
|
|
);
|
|
|
|
|
$telegramService->sendMessage($message->chat_id, $text, 'markdown');
|
|
|
|
|
}
|
|
|
|
|
}
|