mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-12-04 22:42:21 +00:00
Add support for Modal Interactions
This commit is contained in:
@@ -688,8 +688,11 @@ class ConnectionState:
|
||||
if data['type'] == 3: # interaction component
|
||||
custom_id = interaction.data['custom_id'] # type: ignore
|
||||
component_type = interaction.data['component_type'] # type: ignore
|
||||
self._view_store.dispatch(component_type, custom_id, interaction)
|
||||
|
||||
self._view_store.dispatch_view(component_type, custom_id, interaction)
|
||||
elif data['type'] == 5: # modal submit
|
||||
custom_id = interaction.data['custom_id'] # type: ignore
|
||||
components = interaction.data['components'] # type: ignore
|
||||
self._view_store.dispatch_modal(custom_id, interaction, components) # type: ignore
|
||||
self.dispatch('interaction', interaction)
|
||||
|
||||
def parse_presence_update(self, data) -> None:
|
||||
|
||||
Reference in New Issue
Block a user