fix
This commit is contained in:
@@ -62,6 +62,11 @@ class AuthStorage:
|
||||
data = await asyncio.to_thread(self._load_sync)
|
||||
return str(user_id) in data
|
||||
|
||||
async def get_all_user_ids(self) -> list[int]:
|
||||
async with self._lock:
|
||||
data = await asyncio.to_thread(self._load_sync)
|
||||
return [int(k) for k in data.keys()]
|
||||
|
||||
def _load_sync(self) -> dict:
|
||||
if not self.file_path.exists():
|
||||
return {}
|
||||
|
||||
Reference in New Issue
Block a user