Skip to content

Commit

Permalink
instance to use imports
Browse files Browse the repository at this point in the history
Co-authored-by: SQKo <[email protected]>
  • Loading branch information
valzargaming and SQKo authored Feb 25, 2025
1 parent 9a4154f commit acefceb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Discord/Builders/MessageBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ public function addComponent(Component $component): self
if (isset($this->components) && count($this->components) >= 10) {
throw new \OverflowException('You can only add 10 components to a v2 message');
}
} elseif (! ($component instanceof Components\ActionRow || $component instanceof Components\SelectMenu)) {
} elseif (! ($component instanceof ActionRow || $component instanceof SelectMenu)) {
throw new \InvalidArgumentException('You can only add action rows and select menus as components to v1 messages. Put your other components inside an action row.');
} elseif (isset($this->components) && count($this->components) >= 5) {
throw new \OverflowException('You can only add 5 components to a v1 message');
Expand Down

0 comments on commit acefceb

Please sign in to comment.