File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 33from .base import BaseDataClass
44from .progression import Progression
55from ..misc import date_to_unix , bitmask_decode
6+ from ..rest .exceptions import RateLimited
67
78if TYPE_CHECKING :
89 from . import Event , Image , Room
@@ -167,8 +168,11 @@ async def get_bio(self, force: bool = False) -> str:
167168 :return: The player's bio.
168169 """
169170 if self .bio is None or force :
170- data : 'Response[BioResponse]' = await self .rec_net .accounts (self .id ).bio .make_request ('get' )
171- self .bio = data .data ['bio' ]
171+ try :
172+ data : 'Response[BioResponse]' = await self .rec_net .accounts (self .id ).bio .make_request ('get' )
173+ self .bio = data .data ['bio' ]
174+ except RateLimited :
175+ self .bio = "Unable to fetch bio!"
172176 return self .bio
173177
174178 async def get_level (self , force : bool = False ) -> 'Progression' :
You can’t perform that action at this time.
0 commit comments