Skip to content

Commit

Permalink
🐛 Fix client unable to get player stats data
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
luoshuijs committed Aug 22, 2023
1 parent 5e18290 commit 54b8ee6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions plugins/genshin/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ async def command_start(self, update: "Update", context: "ContextTypes.DEFAULT_T
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:
Expand Down

0 comments on commit 54b8ee6

Please sign in to comment.