import aiohttp

class SafeSubsClient:
    def __init__(self, api_token: str, api_url: str = "https://subs.sxve.it/v1/check"):
        self.api_token = api_token
        self.api_url = api_url

    async def __call__(self, user_id: int) -> bool:
        async with aiohttp.ClientSession() as session:
            async with session.post(
                self.api_url,
                json={"user_id": user_id, "auth_token": self.api_token}
            ) as resp:
                if resp.status != 200:
                    return False
                data = await resp.json()
                return data.get("status", False)
