File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -592,21 +592,24 @@ async def load_session(self):
592592 else :
593593 # Needed for migration from storage v2 to v3
594594 if not await self .storage .api_id ():
595- while True :
596- try :
597- value = int (await ainput ("Enter the api_id part of the API key: " ))
595+ if self .api_id :
596+ await self .storage .api_id (self .api_id )
597+ else :
598+ while True :
599+ try :
600+ value = int (await ainput ("Enter the api_id part of the API key: " ))
598601
599- if value <= 0 :
600- print ("Invalid value" )
601- continue
602+ if value <= 0 :
603+ print ("Invalid value" )
604+ continue
602605
603- confirm = (await ainput (f'Is "{ value } " correct? (y/N): ' )).lower ()
606+ confirm = (await ainput (f'Is "{ value } " correct? (y/N): ' )).lower ()
604607
605- if confirm == "y" :
606- await self .storage .api_id (value )
607- break
608- except Exception as e :
609- print (e )
608+ if confirm == "y" :
609+ await self .storage .api_id (value )
610+ break
611+ except Exception as e :
612+ print (e )
610613
611614 def load_plugins (self ):
612615 if self .plugins :
You can’t perform that action at this time.
0 commit comments