Compare commits

..

4 Commits

Author SHA1 Message Date
smallfawn
9360acb49e F 2025-03-09 21:38:09 +08:00
smallfawn
c542fd91b2 FIX BUG 2025-03-09 21:12:35 +08:00
smallfawn
ad512729ea Update bawangchaji.js 2025-03-09 21:08:23 +08:00
smallfawn
ca57772d6d 修复通知 2025-03-09 21:01:13 +08:00
9 changed files with 233 additions and 254 deletions

2
dw.js

File diff suppressed because one or more lines are too long

View File

@ -205,20 +205,17 @@ function Env(t, s) {
} }
async sendMsg() { async sendMsg() {
this.log("==============📣Center 通知📣==============") this.log("==============📣Center 通知📣==============")
for (let item of this.notifyStr) { for (let i = 0; i < this.notifyStr.length; i++) {
if (Object.prototype.toString.call(item) === '[object Object]') { if (Object.prototype.toString.call(this.notifyStr[i]) === '[object Object]' ||
item = JSON.stringify(item) Object.prototype.toString.call(this.notifyStr[i]) === '[object Array]') {
} this.notifyStr[i] = JSON.stringify(this.notifyStr[i]);
if (Object.prototype.toString.call(arg) === '[object Array]') {
item = JSON.stringify(item)
} }
} }
let message = this.notifyStr.join(this.logSeparator); let message = this.notifyStr.join(this.logSeparator);
if (this.isNode()) { if (this.isNode()) {
await notify.sendNotify(this.name, message); await notify.sendNotify(this.name, message);
} else { } else {
} }
} }
isNode() { isNode() {
@ -320,8 +317,8 @@ function Env(t, s) {
wait(t) { wait(t) {
return new Promise((s) => setTimeout(s, t)); return new Promise((s) => setTimeout(s, t));
} }
done(t = {}) { async done(t = {}) {
this.sendMsg(); await this.sendMsg();
const s = new Date().getTime(), const s = new Date().getTime(),
e = (s - this.startTime) / 1e3; e = (s - this.startTime) / 1e3;
this.log( this.log(

View File

@ -89,7 +89,7 @@ class _0x4c79d9 {
this.log("[" + _0x1692ef + "]请求超时(" + _0x1952e1 / 1000 + "秒),重试第" + _0x43077e + "次"); this.log("[" + _0x1692ef + "]请求超时(" + _0x1952e1 / 1000 + "秒),重试第" + _0x43077e + "次");
} else { } else {
{ {
if (_0x57c026.includes(_0x5a4ec4?.["name"])) this.log("[" + _0x1692ef + "]请求超时(" + _0x5a4ec4.code + "),重试第" + _0x43077e + "次");else { if (_0x57c026.includes(_0x5a4ec4?.["name"])) this.log("[" + _0x1692ef + "]请求超时(" + _0x5a4ec4.code + "),重试第" + _0x43077e + "次"); else {
if (_0x15a3b6.includes(_0x5a4ec4?.["code"])) { if (_0x15a3b6.includes(_0x5a4ec4?.["code"])) {
this.log("[" + _0x1692ef + "]请求错误(" + _0x5a4ec4.code + "),重试第" + _0x43077e + "次"); this.log("[" + _0x1692ef + "]请求错误(" + _0x5a4ec4.code + "),重试第" + _0x43077e + "次");
} else { } else {
@ -119,7 +119,7 @@ class _0x4c79d9 {
} = _0x2d2118; } = _0x2d2118;
if (_0x204398) try { if (_0x204398) try {
_0x204398 = JSON.parse(_0x204398); _0x204398 = JSON.parse(_0x204398);
} catch {} } catch { }
const _0x21a81f = { const _0x21a81f = {
"statusCode": _0x15e772, "statusCode": _0x15e772,
"headers": _0x2501a2, "headers": _0x2501a2,
@ -529,7 +529,7 @@ function _0x2fbb6b(_0x5a60f2) {
const _0x3608c4 = { const _0x3608c4 = {
"notify": true "notify": true
}; };
this.log("未找到变量,请检查变量" + _0x25b427.map(_0x357aa2 => "[" + _0x357aa2 + "]").join("或"), _0x3608c4); console.log("未找到变量,请检查变量" + _0x25b427.map(_0x357aa2 => "[" + _0x357aa2 + "]").join("或"), _0x3608c4);
return false; return false;
} }
this.log("共找到" + this.userCount + "个账号"); this.log("共找到" + this.userCount + "个账号");
@ -604,7 +604,7 @@ function _0x2fbb6b(_0x5a60f2) {
let _0x16b674 = ""; let _0x16b674 = "";
for (let _0xc4493c of _0x16140f) { for (let _0xc4493c of _0x16140f) {
{ {
if (_0xc4493c == "x") _0x16b674 += _0x213ac1.charAt(Math.floor(Math.random() * _0x213ac1.length));else { if (_0xc4493c == "x") _0x16b674 += _0x213ac1.charAt(Math.floor(Math.random() * _0x213ac1.length)); else {
_0xc4493c == "X" ? _0x16b674 += _0x213ac1.charAt(Math.floor(Math.random() * _0x213ac1.length)).toUpperCase() : _0x16b674 += _0xc4493c; _0xc4493c == "X" ? _0x16b674 += _0x213ac1.charAt(Math.floor(Math.random() * _0x213ac1.length)).toUpperCase() : _0x16b674 += _0xc4493c;
} }
} }
@ -668,7 +668,7 @@ function _0x2fbb6b(_0x5a60f2) {
_0x852c0e = _0x5833a2.ahead || this.default_wait_ahead; _0x852c0e = _0x5833a2.ahead || this.default_wait_ahead;
if (typeof _0xe30940 == "string" && _0xe30940.includes(":")) { if (typeof _0xe30940 == "string" && _0xe30940.includes(":")) {
{ {
if (_0xe30940.includes("-")) _0xe30940 = new Date(_0xe30940).getTime();else { if (_0xe30940.includes("-")) _0xe30940 = new Date(_0xe30940).getTime(); else {
let _0x4bd7fc = this.time("yyyy-MM-dd "); let _0x4bd7fc = this.time("yyyy-MM-dd ");
_0xe30940 = new Date(_0x4bd7fc + _0xe30940).getTime(); _0xe30940 = new Date(_0x4bd7fc + _0xe30940).getTime();
} }

View File

@ -248,20 +248,17 @@ function Env(t, s) {
} }
async sendMsg() { async sendMsg() {
this.log("==============📣Center 通知📣==============") this.log("==============📣Center 通知📣==============")
for (let item of this.notifyStr) { for (let i = 0; i < this.notifyStr.length; i++) {
if (Object.prototype.toString.call(item) === '[object Object]') { if (Object.prototype.toString.call(this.notifyStr[i]) === '[object Object]' ||
item = JSON.stringify(item) Object.prototype.toString.call(this.notifyStr[i]) === '[object Array]') {
} this.notifyStr[i] = JSON.stringify(this.notifyStr[i]);
if (Object.prototype.toString.call(arg) === '[object Array]') {
item = JSON.stringify(item)
} }
} }
let message = this.notifyStr.join(this.logSeparator); let message = this.notifyStr.join(this.logSeparator);
if (this.isNode()) { if (this.isNode()) {
await notify.sendNotify(this.name, message); await notify.sendNotify(this.name, message);
} else { } else {
} }
} }
isNode() { isNode() {
@ -363,8 +360,8 @@ function Env(t, s) {
wait(t) { wait(t) {
return new Promise((s) => setTimeout(s, t)); return new Promise((s) => setTimeout(s, t));
} }
done(t = {}) { async done(t = {}) {
this.sendMsg(); await this.sendMsg();
const s = new Date().getTime(), const s = new Date().getTime(),
e = (s - this.startTime) / 1e3; e = (s - this.startTime) / 1e3;
this.log( this.log(

View File

@ -152,7 +152,7 @@ class Task extends Public {
})() })()
.catch((e) => console.log(e)) .catch((e) => console.log(e))
.finally(() => $.done()); .finally( () => $.done());
async function getNotice() { async function getNotice() {
let options = { let options = {
@ -189,20 +189,17 @@ function Env(t, s) {
} }
async sendMsg() { async sendMsg() {
this.log("==============📣Center 通知📣==============") this.log("==============📣Center 通知📣==============")
for (let item of this.notifyStr) { for (let i = 0; i < this.notifyStr.length; i++) {
if (Object.prototype.toString.call(item) === '[object Object]') { if (Object.prototype.toString.call(this.notifyStr[i]) === '[object Object]' ||
item = JSON.stringify(item) Object.prototype.toString.call(this.notifyStr[i]) === '[object Array]') {
} this.notifyStr[i] = JSON.stringify(this.notifyStr[i]);
if (Object.prototype.toString.call(arg) === '[object Array]') {
item = JSON.stringify(item)
} }
} }
let message = this.notifyStr.join(this.logSeparator); let message = this.notifyStr.join(this.logSeparator);
if (this.isNode()) { if (this.isNode()) {
await notify.sendNotify(this.name, message); await notify.sendNotify(this.name, message);
} else { } else {
} }
} }
isNode() { isNode() {
@ -304,8 +301,8 @@ function Env(t, s) {
wait(t) { wait(t) {
return new Promise((s) => setTimeout(s, t)); return new Promise((s) => setTimeout(s, t));
} }
done(t = {}) { async done(t = {}) {
this.sendMsg(); await this.sendMsg();
const s = new Date().getTime(), const s = new Date().getTime(),
e = (s - this.startTime) / 1e3; e = (s - this.startTime) / 1e3;
this.log( this.log(

View File

@ -164,20 +164,17 @@ function Env(t, s) {
} }
async sendMsg() { async sendMsg() {
this.log("==============📣Center 通知📣==============") this.log("==============📣Center 通知📣==============")
for (let item of this.notifyStr) { for (let i = 0; i < this.notifyStr.length; i++) {
if (Object.prototype.toString.call(item) === '[object Object]') { if (Object.prototype.toString.call(this.notifyStr[i]) === '[object Object]' ||
item = JSON.stringify(item) Object.prototype.toString.call(this.notifyStr[i]) === '[object Array]') {
} this.notifyStr[i] = JSON.stringify(this.notifyStr[i]);
if (Object.prototype.toString.call(arg) === '[object Array]') {
item = JSON.stringify(item)
} }
} }
let message = this.notifyStr.join(this.logSeparator); let message = this.notifyStr.join(this.logSeparator);
if (this.isNode()) { if (this.isNode()) {
await notify.sendNotify(this.name, message); await notify.sendNotify(this.name, message);
} else { } else {
} }
} }
isNode() { isNode() {
@ -279,8 +276,8 @@ function Env(t, s) {
wait(t) { wait(t) {
return new Promise((s) => setTimeout(s, t)); return new Promise((s) => setTimeout(s, t));
} }
done(t = {}) { async done(t = {}) {
this.sendMsg(); await this.sendMsg();
const s = new Date().getTime(), const s = new Date().getTime(),
e = (s - this.startTime) / 1e3; e = (s - this.startTime) / 1e3;
this.log( this.log(

View File

@ -130,7 +130,7 @@ class Task extends Public {
})() })()
.catch((e) => console.log(e)) .catch((e) => console.log(e))
.finally(() => $.done()); .finally( () => $.done());
async function getNotice() { async function getNotice() {
let options = { let options = {
@ -167,20 +167,17 @@ function Env(t, s) {
} }
async sendMsg() { async sendMsg() {
this.log("==============📣Center 通知📣==============") this.log("==============📣Center 通知📣==============")
for (let item of this.notifyStr) { for (let i = 0; i < this.notifyStr.length; i++) {
if (Object.prototype.toString.call(item) === '[object Object]') { if (Object.prototype.toString.call(this.notifyStr[i]) === '[object Object]' ||
item = JSON.stringify(item) Object.prototype.toString.call(this.notifyStr[i]) === '[object Array]') {
} this.notifyStr[i] = JSON.stringify(this.notifyStr[i]);
if (Object.prototype.toString.call(arg) === '[object Array]') {
item = JSON.stringify(item)
} }
} }
let message = this.notifyStr.join(this.logSeparator); let message = this.notifyStr.join(this.logSeparator);
if (this.isNode()) { if (this.isNode()) {
await notify.sendNotify(this.name, message); await notify.sendNotify(this.name, message);
} else { } else {
} }
} }
isNode() { isNode() {
@ -282,8 +279,8 @@ function Env(t, s) {
wait(t) { wait(t) {
return new Promise((s) => setTimeout(s, t)); return new Promise((s) => setTimeout(s, t));
} }
done(t = {}) { async done(t = {}) {
this.sendMsg(); await this.sendMsg();
const s = new Date().getTime(), const s = new Date().getTime(),
e = (s - this.startTime) / 1e3; e = (s - this.startTime) / 1e3;
this.log( this.log(

View File

@ -158,7 +158,7 @@ class Task extends Public {
})() })()
.catch((e) => console.log(e)) .catch((e) => console.log(e))
.finally(() => $.done()); .finally( () => $.done());
async function getNotice() { async function getNotice() {
let options = { let options = {
@ -194,20 +194,17 @@ function Env(t, s) {
} }
async sendMsg() { async sendMsg() {
this.log("==============📣Center 通知📣==============") this.log("==============📣Center 通知📣==============")
for (let item of this.notifyStr) { for (let i = 0; i < this.notifyStr.length; i++) {
if (Object.prototype.toString.call(item) === '[object Object]') { if (Object.prototype.toString.call(this.notifyStr[i]) === '[object Object]' ||
item = JSON.stringify(item) Object.prototype.toString.call(this.notifyStr[i]) === '[object Array]') {
} this.notifyStr[i] = JSON.stringify(this.notifyStr[i]);
if (Object.prototype.toString.call(arg) === '[object Array]') {
item = JSON.stringify(item)
} }
} }
let message = this.notifyStr.join(this.logSeparator); let message = this.notifyStr.join(this.logSeparator);
if (this.isNode()) { if (this.isNode()) {
await notify.sendNotify(this.name, message); await notify.sendNotify(this.name, message);
} else { } else {
} }
} }
isNode() { isNode() {
@ -309,8 +306,8 @@ function Env(t, s) {
wait(t) { wait(t) {
return new Promise((s) => setTimeout(s, t)); return new Promise((s) => setTimeout(s, t));
} }
done(t = {}) { async done(t = {}) {
this.sendMsg(); await this.sendMsg();
const s = new Date().getTime(), const s = new Date().getTime(),
e = (s - this.startTime) / 1e3; e = (s - this.startTime) / 1e3;
this.log( this.log(

View File

@ -102,20 +102,17 @@ function Env(t, s) {
} }
async sendMsg() { async sendMsg() {
this.log("==============📣Center 通知📣==============") this.log("==============📣Center 通知📣==============")
for (let item of this.notifyStr) { for (let i = 0; i < this.notifyStr.length; i++) {
if (Object.prototype.toString.call(item) === '[object Object]') { if (Object.prototype.toString.call(this.notifyStr[i]) === '[object Object]' ||
item = JSON.stringify(item) Object.prototype.toString.call(this.notifyStr[i]) === '[object Array]') {
} this.notifyStr[i] = JSON.stringify(this.notifyStr[i]);
if (Object.prototype.toString.call(arg) === '[object Array]') {
item = JSON.stringify(item)
} }
} }
let message = this.notifyStr.join(this.logSeparator); let message = this.notifyStr.join(this.logSeparator);
if (this.isNode()) { if (this.isNode()) {
await notify.sendNotify(this.name, message); await notify.sendNotify(this.name, message);
} else { } else {
} }
} }
isNode() { isNode() {
@ -217,8 +214,8 @@ function Env(t, s) {
wait(t) { wait(t) {
return new Promise((s) => setTimeout(s, t)); return new Promise((s) => setTimeout(s, t));
} }
done(t = {}) { async done(t = {}) {
this.sendMsg(); await this.sendMsg();
const s = new Date().getTime(), const s = new Date().getTime(),
e = (s - this.startTime) / 1e3; e = (s - this.startTime) / 1e3;
this.log( this.log(