Browse Source

upd fix

master
gsd 1 year ago
parent
commit
9d1ac1ee13
  1. 9
      tradebot.facti13.external.py

9
tradebot.facti13.external.py

@ -110,6 +110,10 @@ class SteamClient(SteamPy.Client):
info(f"[{trade.id}] Incoming trade from [{trade.partner.id}] {trade.partner.name}")
if trade.is_our_offer():
warning(f"[{trade.id}] trade from me, ignoring")
return
if trade.state != SteamPy.enums.TradeOfferState.Active:
error(f"[{trade.id}] trade have not active stats")
await trade.decline()
@ -157,9 +161,10 @@ class SteamClient(SteamPy.Client):
return
#Принятый трейд
async def on_trade_update(self, before: SteamPy.TradeOffer, after: SteamPy.TradeOffer):
trade:SteamPy.TradeOffer = after
async def on_trade_update(self, _, trade: SteamPy.TradeOffer):
if trade.state != SteamPy.enums.TradeOfferState.Accepted:
warning(f"[{trade.id}] Trade dont have status Accepted, ignore")
return
info(f"[{trade.id}] Finalize accept")

Loading…
Cancel
Save