Skip to content
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.

Commit

Permalink
feat(farmer): imp _alliance_shop_autobuy
Browse files Browse the repository at this point in the history
Signed-off-by: hldh214 <[email protected]>
  • Loading branch information
hldh214 committed Aug 31, 2023
1 parent aa26421 commit 091a80b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lokbot/farmer.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,13 @@ def _alliance_shop_autobuy(self, item_code_list=(ITEM_CODE_VIP_100,)):
continue

amount = minimum_buy_amount if minimum_buy_amount < amount_available else amount_available
self.api.alliance_shop_buy(code, amount)

try:
self.api.alliance_shop_buy(code, amount)
except OtherException as error_code:
logger.warning(f'alliance_shop_buy failed({str(error_code)}): {code}, {amount}')
return

alliance_point -= cost * amount

@functools.lru_cache()
Expand Down

0 comments on commit 091a80b

Please sign in to comment.