11 lines
353 B
Python
11 lines
353 B
Python
__all__ = ("token_client",)
|
|
|
|
import aiohttp
|
|
|
|
|
|
async def token_client(access_token: str) -> dict | None:
|
|
headers = {"Authorization": f"Bearer {access_token}"}
|
|
async with aiohttp.ClientSession() as session:
|
|
async with session.get("https://discord.com/api/oauth2/@me", headers=headers) as response:
|
|
return await response.json()
|