Browse Source

ebatory

master
gsd 1 year ago
parent
commit
75fd414584
  1. 26
      tradebot.facti13.external.py

26
tradebot.facti13.external.py

@ -77,18 +77,6 @@ class SteamClient(SteamPy.Client):
backend : BackendClient = None
backend_checker_enable = False
async def on_ready(self):
info(f"Logged in as: {self.user}")
asyncio.ensure_future(self.backend_checker(60))
async def on_connect(self):
await self.backend.pulse()
ok("Success connect to steam")
async def on_disconnect(self):
await self.backend.pulse()
ok("Disconnect from steam")
async def update_prices(self, exit_if_error = False):
prices = await self.backend.prices(exit_if_error)
self.items = TradeChecker(prices)
@ -236,6 +224,20 @@ if __name__ == "__main__":
error("steam auth data or steam secret not be setted")
sys.exit(2)
@client.event
async def on_ready(client):
info(f"Logged in as: {client.user}")
asyncio.ensure_future(client.backend_checker(60))
@client.event
async def on_connect(client):
await client.backend.pulse()
ok("Success connect to steam")
@client.event
async def on_disconnect(client):
await client.backend.pulse()
ok("Disconnect from steam")
client.run(
username=login,

Loading…
Cancel
Save