Add support for Modal Interactions

This commit is contained in:
Josh
2022-02-20 19:57:44 +10:00
committed by GitHub
parent 964ca0a6f1
commit 19c6687b55
13 changed files with 679 additions and 17 deletions

View File

@@ -51,6 +51,7 @@ __all__ = (
'VideoQualityMode',
'ComponentType',
'ButtonStyle',
'TextStyle',
'StagePrivacyLevel',
'InteractionType',
'InteractionResponseType',
@@ -530,6 +531,7 @@ class InteractionType(Enum):
ping = 1
application_command = 2
component = 3
modal_submit = 5
class InteractionResponseType(Enum):
@@ -540,6 +542,7 @@ class InteractionResponseType(Enum):
deferred_channel_message = 5 # (with source)
deferred_message_update = 6 # for components
message_update = 7 # for components
modal = 9 # for modals
class VideoQualityMode(Enum):
@@ -554,6 +557,7 @@ class ComponentType(Enum):
action_row = 1
button = 2
select = 3
text_input = 4
def __int__(self):
return self.value
@@ -578,6 +582,17 @@ class ButtonStyle(Enum):
return self.value
class TextStyle(Enum):
short = 1
paragraph = 2
# Aliases
long = 2
def __int__(self) -> int:
return self.value
class StagePrivacyLevel(Enum):
public = 1
closed = 2