Skip to content
Merged
Changes from 1 commit
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
9 changes: 7 additions & 2 deletions interactions/client/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ async def send(
Union[ActionRow, Button, SelectMenu, List[ActionRow], List[Button], List[SelectMenu]]
] = MISSING,
ephemeral: Optional[bool] = False,
suppress_embeds: bool = False,
) -> dict:
"""
This allows the invocation state described in the "context"
Expand All @@ -139,6 +140,8 @@ async def send(
:type components?: Optional[Union[ActionRow, Button, SelectMenu, List[Union[ActionRow, Button, SelectMenu]]]]
:param ephemeral?: Whether the response is hidden or not.
:type ephemeral?: Optional[bool]
:param suppress_embeds: If embeds should be hidden on the message
:type suppress_embeds: bool
:return: The sent message as an object.
:rtype: Message
"""
Expand Down Expand Up @@ -189,7 +192,9 @@ async def send(
else:
_components = []

_ephemeral: int = (1 << 6) if ephemeral else 0
_flags: int = (1 << 6) if ephemeral else 0
if suppress_embeds:
_flags += 1 << 2

_attachments = [] if attachments is MISSING else [a._json for a in attachments]

Expand All @@ -200,7 +205,7 @@ async def send(
allowed_mentions=_allowed_mentions,
components=_components,
attachments=_attachments,
flags=_ephemeral,
flags=_flags,
)

async def edit(
Expand Down