Closed tmdted closed 4 years ago
If you want status messages sent by /mirrorstatus
to not be auto-deleted, change line 95 of index.ts to sendStatusMessage(msg, true);
Solved! Thanx @out386
What was the solution?
After this, bot works like a charm
Everything else on index.ts is same except this mirrorstatus thing, I did the laststatus deletion here also,thus it runs twice, tho i don't know its necessary or not 🤷♂️! I did this because i faced that problem, so Maybe running twice could delete old messages left.. but you see, if sendStatusMessage(msg, true);
, there won't be any old messages left undeleted🤷♂️ even tho i did this
And very important thing is, if we set sendStatusMessage(msg, true);
, the /mirrorstatus message we send won't be deleted after the status message is sent.
Thus i kept a 10 seconds deletion timer for it, so even if any lag also.. the status message will be printed within 10 seconds.. so no worries. But i need an alternate for this, i want the /mirrorstatus msg we send is to be deleted only after status update is send, no timers. But you can see i am not good at coding 😅 Suggest something efficient. @out386
If we did not request /mirrorstatus within few minutes, previous status messages are not deleting and just sleeps after new update request is made.
ttl = 3600000 which means 1 hour, i made this change in in sendStatusMessage function of index.ts, thus these previous status messages are deleting fine after this 1 hour!! BUT it should be deleted after a new request is made
And also I want the status message to be permanent without this timer, i tried that by setting this to false, but /mirrorstatus message we send is not being deleted after the statusupdate. what to do? anyone help!