Fix: số lãi đặt lệnh, xem số lãi

This commit is contained in:
Dung Nguyen 2022-03-05 15:27:36 +07:00
parent b3dabd2b9e
commit c0568a1ec2

View File

@ -111,10 +111,6 @@ puppeteer
(e) => e.sessionID === currentSessionID && e.enable
);
if (interrupted > CONFIG.interrupted) {
// Đủ tiền lãi hằng ngày rồi, không vào thêm lệnh nữa
CONFIG.enterOrderList = [];
} else {
if (indSessionID > -1 && isDisableBtn) {
CONFIG.enterOrderList[indSessionID].enable = false;
CONFIG.enterOrderList[indSessionID].time = new Date().toLocaleString(
@ -129,7 +125,6 @@ puppeteer
);
}
}
}
if (
data.includes("SOCKET_BO_LAST_RESULT") &&
@ -285,7 +280,8 @@ puppeteer
9. /analytics - Xem toàn bộ thống ;
10. /interrupted:number - Cắt lời;
11. /reset_interrupted - Reset lãi ngày, tức qua 1 ngày cần config lại cái này. Để hệ thống reset lãi về 0;
12. /sync_money - Đồng bộ tiền tính toán theo phiên tiền trong ;`,
12. /sync_money - Đồng bộ tiền tính toán theo phiên tiền trong ;
13. /view_amount - Xem số lãi trong ngày;`,
{ parse_mode: "HTML" }
);
return;
@ -430,7 +426,7 @@ SELL: /sell:[number]`,
}
);
} else {
let textResult = `Số lần xuất hiện Nến thông\n`;
let textResult = `Số lần xuất hiện|Nến thông\n`;
if (!results.length) {
textResult = "Chưa có thống kê lịch sử!";
} else {
@ -479,6 +475,16 @@ SELL: /sell:[number]`,
}
return;
}
if (text === '/view_amount') {
TeleGlobal.sendMessage(
myTelegramID,
`Số lãi hiện tại là ${interrupted}!`,
{ parse_mode: "HTML" }
);
return;
}
});
});
@ -534,6 +540,16 @@ function roleEnterOrder(sessionID, lastResult) {
const currentEnterOrder = currentEnterOrderFn();
if (interrupted > CONFIG.interrupted) {
TeleGlobal.sendMessage(
TELEGRAM_CHANNEL,
`Số lãi trong ngày (${interrupted}) lớn hơn số lãi config(${CONFIG.interrupted}). Hệ thống sẽ dừng lại!`,
{ parse_mode: "HTML" }
);
CONFIG.enterOrderList = [];
return;
}
if (currentEnterOrder) {
if (currentEnterOrder.trend === lastResult) {
// WIN session
@ -610,14 +626,6 @@ function roleEnterOrder(sessionID, lastResult) {
);
}
}
if (interrupted > CONFIG.interrupted) {
TeleGlobal.sendMessage(
TELEGRAM_CHANNEL,
`Số lãi trong ngày (${interrupted}) lớn hơn số lãi config(${CONFIG.interrupted}). Hệ thống sẽ dừng lại!`,
{ parse_mode: "HTML" }
);
}
}
// 1. Số lệnh thông = 7 thì đánh lệnh ngược lại