mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-07 10:22:59 +00:00
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:
@ -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}'
|
||||
|
Reference in New Issue
Block a user