Add SKU subscriptions support

This commit is contained in:
MCausc78
2024-10-10 01:04:14 +03:00
committed by GitHub
parent 0ce75f3f53
commit 58b6929aa5
10 changed files with 445 additions and 12 deletions

View File

@ -119,6 +119,7 @@ if TYPE_CHECKING:
from .voice_client import VoiceProtocol
from .audit_logs import AuditLogEntry
from .poll import PollAnswer
from .subscription import Subscription
# fmt: off
@ -1373,6 +1374,18 @@ class Client:
) -> Union[str, bytes]:
...
# Entitlements
@overload
async def wait_for(
self,
event: Literal['entitlement_create', 'entitlement_update', 'entitlement_delete'],
/,
*,
check: Optional[Callable[[Entitlement], bool]],
timeout: Optional[float] = None,
) -> Entitlement:
...
# Guilds
@overload
@ -1781,6 +1794,18 @@ class Client:
) -> Coroutine[Any, Any, Tuple[StageInstance, StageInstance]]:
...
# Subscriptions
@overload
async def wait_for(
self,
event: Literal['subscription_create', 'subscription_update', 'subscription_delete'],
/,
*,
check: Optional[Callable[[Subscription], bool]],
timeout: Optional[float] = None,
) -> Subscription:
...
# Threads
@overload
async def wait_for(