mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-05 09:26:10 +00:00
Add support for Modal Interactions
This commit is contained in:
@ -47,7 +47,7 @@ if TYPE_CHECKING:
|
||||
from .view import View
|
||||
from ..types.components import SelectMenu as SelectMenuPayload
|
||||
from ..types.interactions import (
|
||||
ComponentInteractionData,
|
||||
MessageComponentInteractionData,
|
||||
)
|
||||
|
||||
S = TypeVar('S', bound='Select')
|
||||
@ -270,8 +270,7 @@ class Select(Item[V]):
|
||||
def refresh_component(self, component: SelectMenu) -> None:
|
||||
self._underlying = component
|
||||
|
||||
def refresh_state(self, interaction: Interaction) -> None:
|
||||
data: ComponentInteractionData = interaction.data # type: ignore
|
||||
def refresh_state(self, data: MessageComponentInteractionData) -> None:
|
||||
self._selected_values = data.get('values', [])
|
||||
|
||||
@classmethod
|
||||
|
Reference in New Issue
Block a user