Add types

This commit is contained in:
Riley Winkler 2025-02-12 20:24:53 -06:00
parent d18b1bf00d
commit 6fc5f4e916
2 changed files with 38 additions and 0 deletions

View File

@ -0,0 +1 @@
from .discord_types import *

View File

@ -0,0 +1,37 @@
from typing import TypedDict, Optional
__all__ = (
'UserType',
'Application',
'AuthenticateResponse',
)
class UserType(TypedDict):
username: str
discriminator: str
id: str
avatar: Optional[str]
public_flags: int
global_name: Optional[str]
bot: bool
flags: Optional[int]
premium_type: Optional[int]
nickname: Optional[str]
class Application(TypedDict):
description: str
icon: Optional[str]
id: str
rpc_origins: list[str]
name: str
class AuthenticateResponse(TypedDict):
access_token: str
user: UserType
scopes: list[str]
expires: str
application: Application