Skip to content

Commit

Permalink
Fix message send flags (#1723)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: plun1331 <49261529+plun1331@users.noreply.github.com>
  • Loading branch information
3 people committed Oct 23, 2022
1 parent 92de03a commit 0de0652
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions discord/abc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1489,7 +1489,11 @@ async def send(
)
embeds = [embed.to_dict() for embed in embeds]

flags = MessageFlags.suppress_embeds if suppress else MessageFlags.DEFAULT_VALUE
flags = (
MessageFlags.suppress_embeds.flag
if suppress
else MessageFlags.DEFAULT_VALUE
)

if stickers is not None:
stickers = [sticker.id for sticker in stickers]
Expand Down Expand Up @@ -1545,7 +1549,7 @@ async def send(
message_reference=reference,
stickers=stickers,
components=components,
flags=flags.value,
flags=flags,
)
finally:
file.close()
Expand All @@ -1571,7 +1575,7 @@ async def send(
message_reference=reference,
stickers=stickers,
components=components,
flags=flags.value,
flags=flags,
)
finally:
for f in files:
Expand All @@ -1588,7 +1592,7 @@ async def send(
message_reference=reference,
stickers=stickers,
components=components,
flags=flags.value,
flags=flags,
)

ret = state.create_message(channel=channel, data=data)
Expand Down

0 comments on commit 0de0652

Please sign in to comment.