Xboard/app/Plugins/Telegram/Commands/GetLatestUrl.php

22 lines
589 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
namespace App\Plugins\Telegram\Commands;
use App\Models\User;
use App\Plugins\Telegram\Telegram;
class GetLatestUrl extends Telegram {
public $command = '/getlatesturl';
public $description = '获取网站最新网址';
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');
}
}