Skip to content
This repository has been archived by the owner on Dec 26, 2022. It is now read-only.

✨ Partially implement MODAL_SUBMIT #485

Merged
merged 6 commits into from Jun 20, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions pincer/middleware/interaction_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ def get_call(
raise NotImplementedError(
"Handling for autocomplete is not implemented"
)
elif interaction.type == InteractionType.MODAL:
This conversation was marked as resolved.
Show resolved Hide resolved
raise NotImplementedError(
"Handling for modal submit is not implemented"
)


async def interaction_response_handler(
Expand Down
9 changes: 7 additions & 2 deletions pincer/objects/app/interaction_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class CallbackType(IntEnum):

Attributes
----------
PONG:
PONG::iphon
ACK a Ping
MESSAGE:
Respond to an interaction with a message
Expand Down Expand Up @@ -55,13 +55,18 @@ class InteractionType(IntEnum):
APPLICATION_COMMAND:
A "slash" command.
MESSAGE_COMPONENT:
A ui component like buttons and selects.
A UI component like buttons and selects.
This conversation was marked as resolved.
Show resolved Hide resolved
AUTOCOMPLETE:
Autocomplete for interaction options.
MODAL:
Emitter when a modal gets submitted.
"""

PING = 1
APPLICATION_COMMAND = 2
MESSAGE_COMPONENT = 3
AUTOCOMPLETE = 4
MODAL = 5


@dataclass(repr=False)
Expand Down
5 changes: 4 additions & 1 deletion pincer/objects/app/interaction_flags.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ class InteractionFlags(IntFlag):
Attributes
----------
EPHEMERAL:
only the user receiving the message can see it
Only the user receiving the message can see it.
SUPPRESS_EMBEDS:
No link embeds should be shown for this message.
"""

EPHEMERAL = 1 << 6
SUPPRESS_EMBEDS = 1 << 2