Skip to content

Commit

Permalink
Allow ephemeral responses to include embeds
Browse files Browse the repository at this point in the history
  • Loading branch information
breqdev committed May 27, 2021
1 parent 8acacb3 commit 1c73244
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions flask_discord_interactions/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,8 @@ def __post_init__(self):
raise ValueError(
"Supply at least one of content, embeds, files, or deferred.")

if self.ephemeral and (
self.embeds is not None or self.files is not None):
raise ValueError(
"Ephemeral responses cannot include embeds or files.")
if self.ephemeral and self.files is not None:
raise ValueError("Ephemeral responses cannot include files.")

if self.embeds is not None:
for i, embed in enumerate(self.embeds):
Expand Down

0 comments on commit 1c73244

Please sign in to comment.