KR/function/sendJDNotify.js

27 lines
26 KiB
JavaScript
Raw Normal View History

2023-08-01 16:47:55 +08:00
/*
2023-11-03 11:17:33 +08:00
一个强大的推送通知库主要用于汇总多条账号消息后集中推送通知
默认情况下账号消息指的是单一账号的消息它由<前缀><用户名><消息内容>组成其中消息内容由一条或多条组成最后用指定字符拼接成一条合并内容
脚本最终汇总多条账号消息后集中触发推送通知业务每个账号的消息占用一行排列顺序以优先触发记录为原则
此库封装了多条方法推送通知业务调用自 sendNotify.js可引用此模块来平替引用它支持单消息推送
账号消息自定义功能如下环境变量
1关键词过滤触发时不推送对应单条账号消息 JD_NOTIFY_FILTER_KEYWORDS
export JD_NOTIFY_FILTER_KEYWORDS="空气@会员"多个关键词用@分割
2消息内容分隔符 JD_NOTIFY_DELIMITER默认为中文逗号
export JD_NOTIFY_DELIMITER="、"此分隔符用于分隔多条账号消息
3设置替换用户名为昵称 JD_NOTIFY_NICKNAMES
export JD_NOTIFY_NICKNAMES="userpin_α@哥哥,userpin_β@弟弟"多个昵称配置用英文逗号分割用户名和昵称用@分割
4是否显示用户名 JD_NOTIFY_SHOW_USERNAMEtrue/false默认显示
export JD_NOTIFY_SHOW_USERNAME="false"
2023-11-29 10:09:10 +08:00
5. 设置推送通知的用户名是否脱敏 JD_NOTIFY_USERNAME_DESENSITIZATIONtrue/false默认不脱敏根据用户名长度动态将部分字符用*替换
JD_NOTIFY_USERNAME_DESENSITIZATION="true"
6设置消息前缀格式 JD_NOTIFY_PREFIX_FORMATA默认为 "【京东账号<序号>】"
2023-11-03 11:17:33 +08:00
export JD_NOTIFY_PREFIX_FORMATA="[账号%]"%代表账号序号
2023-11-29 10:09:10 +08:00
7设置自动合并消息中用数字开头表示数量的内容 JD_NOTIFY_AUTO_MERGE_TYPE
2023-11-03 11:17:33 +08:00
export JD_NOTIFY_AUTO_MERGE_TYPE="积分 🎟️"多个规则用@分割正则匹配
2023-08-01 16:47:55 +08:00
new Env('sendJDNotify');
*/
2023-11-03 11:17:33 +08:00
2023-11-29 10:09:10 +08:00
var il='jsjiami.com.v7';function Iii11l(){const i1lIiI=(function(){return[...[il,'CLjksjhiVraWmGNUiI.HKcndodPmJ.uvVwO7MFhN==','W6RcKWZdHmkn','dCkPW7pcMmk8WQ0C','C8oOWP7dOcC','D8o6arbch8oTnt1ACCk1WOa','n8kcoJ/dIq','WRBcGJypfmouWRa','WOZcK8k/pH7dHSoSDComhq','WR8Ia8kQW7CfW63cLfddU2uhWQJcJW','nqj1WRRcVaVcMZFcPZtcOcyRWQW','cfXtW67dTmofW6itW48ltWNdTY4','WOyQgmk6','EmkLW44VWPy','WQKqW44mnq','xCoyqtT7iCoUFxmjoXW2fG','WReScWz5','fZJdU1e7','WRy2f8kPW4ZcVCosrXBcRCoprwfoWOiScCkhWOOCrmkiW6f+mG','WRvKW4n0WOdcVM7cS8oLWOhdRSkwW5G','WOZcR8oKFGK','W4OgrhuS','WQvIW6XHWOq','gcBdOx43cW','W6JcKHNcKw4','WOpcPGSjfW','e1dcUXet','y8oGCY5g','ESoPWOyavW','kbvSWRJcTbe','pSo/WO1CW4ZdKCkVqHyynCkgWOC','mHVdMw4B','W6v4W7XDaa','eIFdQ30M','44gk5lU55lMq6lAe5yY7fEocPq','W5/cIWVdJSk4mg3dTtLwWPJdKSo2jW','W53dNmkbgCk9zXOGdSkLW6GiW63dOa','W7ldQCobp8oOFCkhAI3dGa','W53dQmozgSoP','W6lcJ2HBBLvm','WOb4W4j1','W5LjeSkzW5rmpCo8WP4bWRVdL8oUW68','W79VjX3dOW','v8kRW4ODWPpcRCo8zt41eCkSWRX5','amohlWhcLSkLBtG8W6S5W5yjcmkyW4nX','nSonhbdcQa','W53dKmkrh8k1tZi3gSkZW50wW7JdTG','mX54WRJcRq','WQWPbtHvWO5SW4tdOWOgefNdVu7dUbOhW7JcImoD','WRldK8ksfdG5','D8oRebzla8o7bYfPBSkMWPuJ','WR3dMCksbYK/yG','C8kUW75SFSkskmkRkCkgbItcGq','WR08W4ZcM18','kCo1WOS9ca','WOq5eZL0','WPzJB8k7wrjcamkWj8o4WO1DWRz7WOWr','WOWUW6Ovcq','W4ubwhuW','W6xcIbG','W6boW71NdSkpeSkpWOWd','WOqJW4BcUa','tSoJhWfbba','ew3dImkQWR8','WRlcJSoVvGlcS8o6WQvAWQ7cPdWq','WOJcISo2yYS','h8oXWQGMp8ofFCkDn8ktbGRcVMNcK8o1ea','W6RcGmooqxq0tSkpuCoeW64','WOOJW4/cNKq','o8kEnIm','mWRcIsTVW7BdPr8','W486wmoiamo2sJqfWQBdNZrdaG','W77cSWxcIW','CCkTW7XSF8kDlmkHimkvbXtcLa','WOCMhIzD','WQvRzmkVxHS','Df4ZWQ7cSaVcSHZcUZpcQcC3','d8kPW67cJa','WOhcTdHkvCojiCkxoWtdTCowWOz5CSoQs8kBfN3dJ8ofDZW','v8oNWPtcMfi','W6ngeq','W7ldQSonl8oWCSkbyGZdLJHrW6bSWPntWQi','ECoEWQGcAG','nSkKW6xcM8k2WRakdSoxuColW7i0qSoEC1SXW5zYqtG','WQ3cPcvl','W63dG8kndmkZBbOGdSkLW6GiW63dOa','lJhdG3CX','WRtcHdC6gSoeWR0','WP95mmk9WOO','FmonWQeDr8kgWRe'],...(function(){return[...['WOzYW7VdO2tcTG','W7rbasVdIX3cPbddO8kmy2q0W4q','aLlcUmo0WQqhfIhdHSoXWR48Bmo+WOBdSCkv','W67dLmkkdmkUAG','FCk5W5OBWRlcGCo0CG','cSoyWPiBa8oWu8k+kSkPoJhcLKBcRSoiprCysSktWO5JiW','WRbjW6XGiSkmdW','WQDvkSkzWPSQj8o2De0','rmoVhrjqhG','aSkwltpdTeJcNrLKr8kpWPXKvG','W7aVsbLP','xSkeW7CzWRq','amoForFcL8kkAZaDW4OWW4Wbd8kFW493W6tcHCk8dSkzWPPn','WPPIW5HZ','WO95W50','W45kW4z8pW','fvtcPSoH','acmCW6pcNq','WQC+W5lcQg0','W4O1q8oehq','aSkckYldQuVcMqzMzSk+WPzXxCogWO3dKgZdQ8k1WPJdGCk2xa','W4DUWOhcG0xcVSkkWQn4','W4ZcOa/cRh8','ksuGW4VcUa','zmkVW5eoWOJcIa','ov/dHSkYWQRdQCoMefrYWOJcVsO','WRSYW6ZcTh4','WOtcKmo+xXhcVSoNWPa','W6ZcGWddM8kRpq','W65Uc8kVW6i','WOC9aYC','a8kYWR5VpaDL','W6lcVLZcLM8XDtpdSSonitHdW5ZcRqTNWPtdVr0X','e8kPWQrY','zGKeWRtcQSkgWRXEW6OVvXJdPse','CCo8WQFcVKZcNdddJ8k9WQdcPGpdQwS','WRlcPcviu8oV','W5LfaSkEW4HGp8oRWR8nWOpdMSo7W7JdSCooDmkCn8o6jrK','W45ofa','p0/cUH0bW7DTl8oxW5RdL8kjpa','tCoYWQRcQuBcHYO','WPL7W7ZdP3u','WOy0i8kxW68','WO7cSmotzqu','WRddLdiwoG0iWR/dVISrjZxdOW','WQParmkEsW','W6tcJX3dJmkWjKu','WQ8Al8kFW5m','W6tdMmkih8k/Ca','WQPsjSkWWPK','lgJdSCktWPldQmoCm39JWRRcMabeWPpcISoZW4O/mSoUW6a0','rCkPW709WOu','lSkhnc7dRW','WRJdN8kefIG','W7y/rSkbkmkXuH3dRMJdSmo9W7Ww','W511W7ddJLNcRJO','WPe7ktHl','W5e/rSkIWQS0WRRcMGm','WQmtk8keW6ZcNmo1DtZcS8o8yLr4','WQbtW4RdIL/cIH3cO8olWPCMgCk0wuPQW5WZW7y','WRDuv8krWO99ASoYW4O','WPlcKmk6dre','WQdcKSk0ktxdH8oRDCoEdr/cLHddTSkvW4lcRSk7WO0BySoU','WPpcK8k/pstdGq','WPuMbc4','W57cJM9myfvzW6VdJt0','fuddH8k+WRG','WPe4W4m','WPKZW4BcO1ZcNSkvWRS','44cO5lQW5lM/6lAm5y2WooodLa','iCkrW63cQ8kB','tCoKbq','ktKLW4hcQq','tg4kW4C','DSoCucv5','WQ3dHSkqgJG','xNupW57dOM8','W5JcTKu','D8oKgHzpgmo0hJDB','WRmoW4ejnmkcWRJdLq','W4VcPfLHrg9XW4ddSre9dqRdGr3dTCoAWPRcKuHMW4RcIMS+','mmkskZtdUMlcNrG','cvlcSr4dW4z7oq','W7lcKgPgAf4','WRbXeKm+wxKPWRPHeIap','mmkrmXddMG','lXFcJZvuW7pdRqK','xmkRW7aZWRK','WOhdHSkofIO4BSkRECoLW6NdGH8','h8oSWR8WkSonySk+hmkebWlcPW'],...(function(){return['kqRcVbr8','W4hdOSogo8o3EW','W5ekqmkWja','W7NcRGhcGW','WRFdLtqAoWOoW5pdPWylfW0','WPVcHa9eyG','W486tSoFamooqtirWOldUt9shG','WQdcM8k0kspdImo/ECoUaqNcLHpdUmk0W5tcUq','W5LBd8kcW4Xuk8oRWOSQWO7dG8o7','W5/cHW3dN8kWie7dPdLKWOVdH8oYlq','WRrcn8k5','WOzYW4v8WOpcGW','udjkEbhdGC