From 54b8ee65f73a30d104917b5e1f7067bd10ad7c10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B4=9B=E6=B0=B4=E5=B1=85=E5=AE=A4?= Date: Tue, 22 Aug 2023 10:18:57 +0800 Subject: [PATCH] :bug: Fix client unable to get player stats data Previously, the client couldn't retrieve the latest player stats from the `client.get_genshin_user()` function without first browsing the application. It was necessary to call `client.get_record_cards()` to trigger a refresh. --- plugins/genshin/stats.py | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/genshin/stats.py b/plugins/genshin/stats.py index c5f4c8a2..e7931459 100644 --- a/plugins/genshin/stats.py +++ b/plugins/genshin/stats.py @@ -46,6 +46,7 @@ class PlayerStatsPlugins(Plugin): try: try: async with self.helper.genshin(user.id) as client: + await client.get_record_cards() render_result = await self.render(client, uid) except CookiesNotFoundError: async with self.helper.public_genshin(user.id) as client: