mirror of
https://github.com/shufflewzc/faker2.git
synced 2025-04-13 14:43:21 +00:00
Update sendNotify.js
This commit is contained in:
parent
2acf16aff7
commit
bc8b768d54
|
@ -1,30 +1,13 @@
|
|||
/*
|
||||
* @Author: lxk0301 https://gitee.com/lxk0301
|
||||
* @Date: 2020-08-19 16:12:40
|
||||
* @Last Modified by: whyour
|
||||
* @Last Modified time: 2021-5-1 15:00:54
|
||||
* sendNotify 推送通知功能
|
||||
* @param text 通知头
|
||||
* @param desp 通知体
|
||||
* @param params 某些推送通知方式点击弹窗可跳转, 例:{ url: 'https://abc.com' }
|
||||
* @param author 作者仓库等信息 例:`本通知 By:https://github.com/whyour/qinglong`
|
||||
部分变量设置
|
||||
## 拆分通知
|
||||
export BEANCHANGE_PERSENT="10"
|
||||
## 如果通知标题在此变量里面存在(&隔开),则用屏蔽不发送通知
|
||||
export NOTIFY_SKIP_LIST="京东CK检测&京东资产变动"
|
||||
## 当接收到发送CK失效通知和Ninja 运行通知时候执行子线程任务
|
||||
export NOTIFY_CKTASK="jd_CheckCK.js"
|
||||
## 如果此变量(&隔开)的关键字在通知内容里面存在,则屏蔽不发送通知.
|
||||
export NOTIFY_SKIP_TEXT="忘了种植&异常"
|
||||
## 屏蔽任务脚本的ck失效通知
|
||||
export NOTIFY_NOCKFALSE="true"
|
||||
## 服务器空数据等错误不触发通知
|
||||
export CKNOWARNERROR="true"
|
||||
## 屏蔽青龙登陆成功通知,登陆失败不屏蔽
|
||||
export NOTIFY_NOLOGINSUCCESS="true"
|
||||
## 通知底部显示
|
||||
export NOTIFY_AUTHOR="来源于:https://github.com/KingRan/KR"
|
||||
## 增加NOTIFY_AUTHOR_BLANK 环境变量,控制不显示底部信息
|
||||
export NOTIFY_AUTHOR_BLANK="true"
|
||||
## 增加NOTIFY_AUTOCHECKCK为true才开启通知脚本内置的自动禁用过期ck
|
||||
export NOTIFY_AUTOCHECKCK=“true”
|
||||
*/
|
||||
//详细说明参考 https://github.com/ccwav/QLScript2.
|
||||
const querystring = require('querystring');
|
||||
|
@ -200,9 +183,10 @@ if (process.env.NOTIFY_SHOWNAMETYPE) {
|
|||
if (ShowRemarkType == "4")
|
||||
console.log("检测到显示备注名称,格式为: 备注");
|
||||
}
|
||||
async function sendNotify(text, desp, params = {}, author = '\n\n本通知 By https://github.com/KingRan/KR',strsummary="") {
|
||||
async function sendNotify(text, desp, params = {}, author = '\n\n本通知 By ccwav Mod', strsummary = "") {
|
||||
console.log(`开始发送通知...`);
|
||||
|
||||
//NOTIFY_FILTERBYFILE代码来自Ca11back.
|
||||
if (process.env.NOTIFY_FILTERBYFILE) {
|
||||
var no_notify = process.env.NOTIFY_FILTERBYFILE.split('&');
|
||||
if (module.parent.filename) {
|
||||
|
@ -218,6 +202,7 @@ async function sendNotify(text, desp, params = {}, author = '\n\n本通知 By ht
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
//Reset 变量
|
||||
UseGroupNotify = 1;
|
||||
|
@ -1390,7 +1375,7 @@ async function sendNotify(text, desp, params = {}, author = '\n\n本通知 By ht
|
|||
}
|
||||
|
||||
if (allCode) {
|
||||
desp += '\n' + '\n' + "格式化后的互助码:" + '\n' + allCode;
|
||||
desp += '\n' + '\n' + "ccwav格式化后的互助码:" + '\n' + allCode;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1477,6 +1462,7 @@ async function sendNotify(text, desp, params = {}, author = '\n\n本通知 By ht
|
|||
$.Remark += Tempinfo;
|
||||
}
|
||||
}
|
||||
|
||||
desp = desp.replace(new RegExp(`${$.UserName}|${$.nickName}`, 'gm'), $.Remark);
|
||||
strsummary = strsummary.replace(new RegExp(`${$.UserName}|${$.nickName}`, 'gm'), $.Remark);
|
||||
//额外处理2,nickName不包含星号,但是确实是手机号
|
||||
|
@ -1647,7 +1633,6 @@ function getQLinfo(strCK, intcreated, strTimestamp, strRemark) {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
return strReturn
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user