Skip to content

Commit

Permalink
Treating None embeds and views as not having embeds and views in send…
Browse files Browse the repository at this point in the history
…_message (#671)
  • Loading branch information
TurqW authored Jan 1, 2022
1 parent 7ca9d17 commit 640c73a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions discord/interactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ async def send_message(
if embed is not MISSING and embeds is not MISSING:
raise TypeError('cannot mix embed and embeds keyword arguments')

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

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

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

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

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

Expand Down

0 comments on commit 640c73a

Please sign in to comment.