Skip to content

Commit

Permalink
ClashKing v4
Browse files Browse the repository at this point in the history
  • Loading branch information
MagicTheDev committed Jan 29, 2024
1 parent e38e4b8 commit b363592
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 692 deletions.
4 changes: 3 additions & 1 deletion classes/bot.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import snappy
import ujson
import dateutil.relativedelta
import coc
Expand Down Expand Up @@ -485,7 +486,7 @@ async def getPlayer(self, player_tag, custom=False, raise_exceptions=False, cach
return None


async def get_players(self, tags: list, fresh_tags=None, custom=True, use_cache=True, fake_results=False, found_results=None, max_age=86400):
async def get_players(self, tags: list, fresh_tags=None, custom=True, use_cache=True, fake_results=False, found_results=None):
if fresh_tags is None:
fresh_tags = []
if custom and fake_results is False:
Expand Down Expand Up @@ -513,6 +514,7 @@ async def get_players(self, tags: list, fresh_tags=None, custom=True, use_cache=
for data in redis_cache_data:
if data is None:
continue
data = snappy.uncompress(data)
data = ujson.loads(data)
self.player_cache_dict[data.get("tag")] = data
tag_set.remove(data.get("tag"))
Expand Down
Loading

0 comments on commit b363592

Please sign in to comment.