Skip to content

Commit

Permalink
Merge pull request Anankke#491 from rico93/nimaqu_dev
Browse files Browse the repository at this point in the history
增加tg bot 重置订阅链接功能
  • Loading branch information
TheCGDF authored Jan 11, 2019
2 parents 7d4b370 + 7df1fff commit bb39517
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/Utils/TelegramProcess.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@

class TelegramProcess
{
private static $all_rss = [ "?mu=0" => "SSR普通订阅" ,
private static $all_rss = [
"clean_link"=>"重置订阅",
"?mu=0" => "SSR普通订阅" ,
"?mu=1" => "SSR单端口订阅",
"?mu=3"=> "SS/SSD订阅",
"?mu=2" => "V2ray订阅",
Expand All @@ -26,6 +28,10 @@ private static function callback_bind_method($bot,$message,$command){
$reply_message = self::$all_rss[$command].": ".$subUrl.$ssr_sub_token.$command.PHP_EOL;
$bot->sendMessage($message->getChat()->getId(), $reply_message , $parseMode = null, $disablePreview = false, $replyToMessageId = $reply_to);
break;
case ($command=="clean_link"):
$user->clean_link();
$bot->sendMessage($message->getChat()->getId(), "链接重置成功" , $parseMode = null, $disablePreview = false, $replyToMessageId = $reply_to);
break;
default:
$bot->sendMessage($message->getChat()->getId(), "???", $parseMode = null, $disablePreview = false, $replyToMessageId = $reply_to);

Expand Down

0 comments on commit bb39517

Please sign in to comment.