Skip to content

Commit

Permalink
this can't be json
Browse files Browse the repository at this point in the history
  • Loading branch information
OwOHamper committed Aug 26, 2022
1 parent e1f24d1 commit e7bdee6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/requestsV.py
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down
4 changes: 3 additions & 1 deletion src/rpc.py
Original file line number Diff line number Diff line change
@@ -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):
Expand Down Expand Up @@ -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"]:
Expand Down

0 comments on commit e7bdee6

Please sign in to comment.