Add support for premium app integrations

Co-authored-by: Danny <1695103+Rapptz@users.noreply.github.com>
Co-authored-by: Lucas Hardt <lucas.hardt@fu-berlin.de>
Co-authored-by: Andrin S. <65789180+Puncher1@users.noreply.github.com>
This commit is contained in:
Lucas Hardt
2023-10-19 13:27:29 +02:00
committed by GitHub
parent 5d353282dc
commit 99618c823a
12 changed files with 828 additions and 4 deletions

View File

@ -70,6 +70,9 @@ __all__ = (
'ForumLayoutType',
'ForumOrderType',
'SelectDefaultValueType',
'SKUType',
'EntitlementType',
'EntitlementOwnerType',
)
if TYPE_CHECKING:
@ -591,6 +594,7 @@ class InteractionResponseType(Enum):
message_update = 7 # for components
autocomplete_result = 8
modal = 9 # for modals
premium_required = 10
class VideoQualityMode(Enum):
@ -782,6 +786,20 @@ class SelectDefaultValueType(Enum):
channel = 'channel'
class SKUType(Enum):
subscription = 5
subscription_group = 6
class EntitlementType(Enum):
application_subscription = 8
class EntitlementOwnerType(Enum):
guild = 1
user = 2
def create_unknown_value(cls: Type[E], val: Any) -> E:
value_cls = cls._enum_value_cls_ # type: ignore # This is narrowed below
name = f'unknown_{val}'