Skip to content

Commit

Permalink
Merge pull request #2465 from upanasiuk/fix-KeysPerDay-error
Browse files Browse the repository at this point in the history
Fix keysPerDay error
  • Loading branch information
shamhi authored Oct 23, 2024
2 parents 39e08a8 + d553a20 commit 7a4e059
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bot/core/tapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,15 +295,15 @@ async def run(self, proxy: Optional[str]) -> None:
continue

title = promo['title']['en']
keys_per_day = promo['keysPerDay']
rewards_per_day = promo['rewardsPerDay']

today_promo_activates_count = promo_activates.get(promo_id, 0)

if today_promo_activates_count >= keys_per_day:
if today_promo_activates_count >= rewards_per_day:
logger.info(f"{self.session_name} | "
f"Promo Codes already claimed today for <lm>{title}</lm> game")

while today_promo_activates_count < keys_per_day:
while today_promo_activates_count < rewards_per_day:
promo_code = await get_promo_code(app_token=app_token,
promo_id=promo_id,
promo_title=title,
Expand All @@ -328,7 +328,7 @@ async def run(self, proxy: Optional[str]) -> None:

logger.success(f"{self.session_name} | "
f"Successfully activated promo code in <lm>{title}</lm> game | "
f"Get <ly>{today_promo_activates_count}</ly><lw>/</lw><ly>{keys_per_day}</ly> diamonds | "
f"Get <ly>{today_promo_activates_count}</ly><lw>/</lw><ly>{rewards_per_day}</ly> diamonds | "
f"<lg>+{amount_reward:,} {type_reward}</lg> | "
f"Balance: <le>{balance:,.3f}</le>")
else:
Expand Down

0 comments on commit 7a4e059

Please sign in to comment.