Skip to content

Commit 66caaf8

Browse files
committed
fix: Throw error when v2 components are used with incompatible things
1 parent 5cefb75 commit 66caaf8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

interactions/models/discord/message.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1074,6 +1074,9 @@ def process_message_payload(
10741074
flags = 0
10751075
flags |= MessageFlags.IS_COMPONENTS_V2
10761076

1077+
if content or embeds:
1078+
raise ValueError("Cannot send content or embeds with v2 components")
1079+
10771080
if stickers:
10781081
stickers = [to_snowflake(sticker) for sticker in stickers]
10791082
allowed_mentions = process_allowed_mentions(allowed_mentions)

0 commit comments

Comments
 (0)