Add types
This commit is contained in:
parent
d18b1bf00d
commit
6fc5f4e916
1
HeliosBackend/types/__init__.py
Normal file
1
HeliosBackend/types/__init__.py
Normal file
@ -0,0 +1 @@
|
||||
from .discord_types import *
|
||||
37
HeliosBackend/types/discord_types.py
Normal file
37
HeliosBackend/types/discord_types.py
Normal 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
|
||||
Loading…
x
Reference in New Issue
Block a user