Skip to content

Commit

Permalink
↩ partially revert 4ee2eb4 - necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
idinium96 committed Jul 7, 2022
1 parent a5f5eea commit ba65050
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/classes/Bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,7 @@ export default class Bot {

promise
.then(() => {
this.manager.pollInterval = 60 * 1000;
this.manager.pollInterval = 5 * 1000;
this.setReady = true;
this.handler.onReady();
this.manager.doPoll();
Expand Down
2 changes: 1 addition & 1 deletion src/classes/Commands/sub-classes/Manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -931,7 +931,7 @@ export default class ManagerCommands {
// Bring back online
this.bot.client.setPersona(EPersonaState.Online);
this.bot.handler.isUpdatingStatus = false;
this.bot.manager.pollInterval = 60 * 1000;
this.bot.manager.pollInterval = 5 * 1000;
};

try {
Expand Down
5 changes: 4 additions & 1 deletion src/classes/Trades.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,10 @@ export default class Trades {
const activeReceived = received.filter(offer => offer.state === TradeOfferManager.ETradeOfferState['Active']);
const activeReceivedCount = activeReceived.length;

if (filter === TradeOfferManager.EOfferFilter['ActiveOnly'] && this.pollCount / 5 >= 1) {
if (
filter === TradeOfferManager.EOfferFilter['ActiveOnly'] &&
(this.pollCount * this.bot.manager.pollInterval) / (2 * 5 * 60 * 1000) >= 1
) {
this.pollCount = 0;

const activeSent = sent.filter(offer => offer.state === TradeOfferManager.ETradeOfferState['Active']);
Expand Down

0 comments on commit ba65050

Please sign in to comment.