mirror of
https://github.com/lkeme/BiliHelper-personal.git
synced 2025-12-19 09:30:10 +08:00
[update] TgBotNotice closed#123
This commit is contained in:
parent
1eb4b692db
commit
7871198933
@ -180,8 +180,9 @@ filter_words =
|
|||||||
[notify.dingtalk]
|
[notify.dingtalk]
|
||||||
token =
|
token =
|
||||||
|
|
||||||
; Tele机器人|token|chatid|依赖USE_NOTIFY
|
; Tele机器人|url(可选)|token|chatid|依赖USE_NOTIFY
|
||||||
[notify.telegram]
|
[notify.telegram]
|
||||||
|
url =
|
||||||
bottoken =
|
bottoken =
|
||||||
chatid =
|
chatid =
|
||||||
|
|
||||||
|
|||||||
@ -189,7 +189,8 @@ class Notice
|
|||||||
private static function teleSend(array $info)
|
private static function teleSend(array $info)
|
||||||
{
|
{
|
||||||
Log::info('使用Tele机器人推送消息');
|
Log::info('使用Tele机器人推送消息');
|
||||||
$url = 'https://api.telegram.org/bot' . getConf('bottoken', 'notify.telegram') . '/sendMessage';
|
$base_url = getConf('url', 'notify.telegram') ?: 'https://api.telegram.org/bot';
|
||||||
|
$url = $base_url . getConf('bottoken', 'notify.telegram') . '/sendMessage';
|
||||||
$payload = [
|
$payload = [
|
||||||
'chat_id' => getConf('chatid', 'notify.telegram'),
|
'chat_id' => getConf('chatid', 'notify.telegram'),
|
||||||
'text' => $info['content']
|
'text' => $info['content']
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user