|
|
@ -1,9 +1,11 @@ |
|
|
|
import traceback |
|
|
|
import steam as SteamPy |
|
|
|
import argparse, os, sys |
|
|
|
import asyncio |
|
|
|
from colors import * |
|
|
|
from json import load |
|
|
|
import asyncio |
|
|
|
from steam.errors import Forbidden as STEAM_FORBIDDEN |
|
|
|
|
|
|
|
from backend_integration import BackendClient |
|
|
|
|
|
|
@ -100,7 +102,13 @@ class SteamClient(SteamPy.Client): |
|
|
|
return |
|
|
|
|
|
|
|
info(f"[{trade.id}] Try accept trade") |
|
|
|
await trade.accept() |
|
|
|
try: |
|
|
|
await trade.accept() |
|
|
|
except STEAM_FORBIDDEN as err: |
|
|
|
traceback.print_exc() |
|
|
|
error("Restart app, steam return forbidden on accept trade") |
|
|
|
sys.exit(1) |
|
|
|
|
|
|
|
info(f"[{trade.id}] Maybe trade acceped...") |
|
|
|
#Force on trade accept |
|
|
|
await asyncio.sleep(3) |
|
|
|