From e7bdee63a9c52f6c3c7516ff84f74b661af425e2 Mon Sep 17 00:00:00 2001 From: OwOHamper Date: Fri, 26 Aug 2022 14:59:18 +0200 Subject: [PATCH] this can't be json --- src/requestsV.py | 2 +- src/rpc.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/requestsV.py b/src/requestsV.py index bb39fee2..f6f363e5 100644 --- a/src/requestsV.py +++ b/src/requestsV.py @@ -104,7 +104,7 @@ def fetch(self, url_type: str, endpoint: str, method: str, rate_limit_seconds=5) f"fetch: url: '{url_type}', endpoint: {endpoint}, method: {method}," f" response code: {response.status_code}") if response.status_code == 404: - return response.json() + return response try: if response.json().get("errorCode") == "BAD_CLAIMS": diff --git a/src/rpc.py b/src/rpc.py index d84477ef..6ed9fd45 100644 --- a/src/rpc.py +++ b/src/rpc.py @@ -1,6 +1,7 @@ from pypresence import Presence from pypresence.exceptions import DiscordNotFound, InvalidID import nest_asyncio +import time class Rpc(): def __init__(self, map_dict, gamemodes, colors): @@ -61,7 +62,8 @@ def set_rpc(self, presence): large_image=mapImage, large_text=mapText, small_image=agent_img, - small_text=agent + small_text=agent, + start=time.time() ) elif presence["sessionLoopState"] == "MENUS": if presence["isIdle"]: