From 9a19b417bfb4c1c37713c3b947aedba27b8581c2 Mon Sep 17 00:00:00 2001 From: alemidev Date: Sun, 12 Dec 2021 02:18:06 +0100 Subject: [PATCH] token changes for minecraft compatibility --- aiocraft/mc/token.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/aiocraft/mc/token.py b/aiocraft/mc/token.py index d29f90c..bee01f8 100644 --- a/aiocraft/mc/token.py +++ b/aiocraft/mc/token.py @@ -45,9 +45,9 @@ class Token: def dict(self): return { "username":self.username, - "access_token":self.access_token, - "client_token":self.client_token, - "profile": self.profile.dict(), + "accessToken":self.access_token, + "clientToken":self.client_token, + "selectedProfile": self.profile.dict(), } @classmethod @@ -58,7 +58,7 @@ class Token: @classmethod def from_dict(cls, data:dict): return cls( - username=data["username"], + username=data["selectedProfile"]["name"], access_token=data["accessToken"], client_token=data["clientToken"], profile=Profile(**data["selectedProfile"]),