Fix: alert
This commit is contained in:
parent
c0568a1ec2
commit
44b67d9278
5
index.js
5
index.js
@ -40,6 +40,7 @@ let dInWeb = null; // Ví tiền theo web
|
|||||||
let currentColorCandle = -1; // Nến hiện tại
|
let currentColorCandle = -1; // Nến hiện tại
|
||||||
let totalColorCandle = 0;
|
let totalColorCandle = 0;
|
||||||
let interrupted = 0; // Lãi thực tế
|
let interrupted = 0; // Lãi thực tế
|
||||||
|
let isShowWarningInterrupted = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tất cả config ở đây
|
* Tất cả config ở đây
|
||||||
@ -456,6 +457,7 @@ SELL: /sell:[number]`,
|
|||||||
|
|
||||||
if (text === '/reset_interrupted') {
|
if (text === '/reset_interrupted') {
|
||||||
interrupted = 0;
|
interrupted = 0;
|
||||||
|
isShowWarningInterrupted = false;
|
||||||
TeleGlobal.sendMessage(
|
TeleGlobal.sendMessage(
|
||||||
myTelegramID,
|
myTelegramID,
|
||||||
`Reset cắt lãi thành công!`,
|
`Reset cắt lãi thành công!`,
|
||||||
@ -540,13 +542,14 @@ function roleEnterOrder(sessionID, lastResult) {
|
|||||||
|
|
||||||
const currentEnterOrder = currentEnterOrderFn();
|
const currentEnterOrder = currentEnterOrderFn();
|
||||||
|
|
||||||
if (interrupted > CONFIG.interrupted) {
|
if (interrupted > CONFIG.interrupted && !isShowWarningInterrupted) {
|
||||||
TeleGlobal.sendMessage(
|
TeleGlobal.sendMessage(
|
||||||
TELEGRAM_CHANNEL,
|
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!`,
|
`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" }
|
{ parse_mode: "HTML" }
|
||||||
);
|
);
|
||||||
CONFIG.enterOrderList = [];
|
CONFIG.enterOrderList = [];
|
||||||
|
isShowWarningInterrupted = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user