Skip to content
Merged
Changes from all 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
14 changes: 7 additions & 7 deletions discord/interactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,9 +502,9 @@ async def send_message(
self,
content: Optional[Any] = None,
*,
embed: Embed = MISSING,
embeds: List[Embed] = MISSING,
view: View = MISSING,
embed: Embed = None,
embeds: List[Embed] = None,
view: View = None,
tts: bool = False,
ephemeral: bool = False,
allowed_mentions: AllowedMentions = None,
Expand Down Expand Up @@ -563,10 +563,10 @@ async def send_message(
'tts': tts,
}

if embed is not MISSING and embeds is not MISSING:
if embed is not None and embeds is not None:
raise TypeError('cannot mix embed and embeds keyword arguments')

if embed is not MISSING and embed is not None:
if embed is not None:
embeds = [embed]

if embeds:
Expand All @@ -580,7 +580,7 @@ async def send_message(
if ephemeral:
payload['flags'] = 64

if view is not MISSING and view is not None:
if view is not None:
payload['components'] = view.to_components()

state = self._parent._state
Expand Down Expand Up @@ -624,7 +624,7 @@ async def send_message(
for file in files:
file.close()

if view is not MISSING and view is not None:
if view is not None:
if ephemeral and view.timeout is None:
view.timeout = 15 * 60.0

Expand Down