File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed
src/Discord/Builders/Components Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -83,6 +83,24 @@ public function addComponent(ComponentObject $component): self
83
83
return $ this ;
84
84
}
85
85
86
+ /**
87
+ * Add a group of components to the action row.
88
+ *
89
+ * @param ComponentObject[] $components Components to add.
90
+ *
91
+ * @throws \InvalidArgumentException Component is not a valid type.
92
+ *
93
+ * @return $this
94
+ */
95
+ public function addComponents ($ components ): self
96
+ {
97
+ foreach ($ components as $ component ) {
98
+ $ this ->addComponent ($ component );
99
+ }
100
+
101
+ return $ this ;
102
+ }
103
+
86
104
/**
87
105
* Removes a component from the action row.
88
106
*
Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ public function addComponent(ComponentObject $component): self
130
130
*
131
131
* @return $this
132
132
*/
133
- public function addComponents (array $ components ): self
133
+ public function addComponents ($ components ): self
134
134
{
135
135
foreach ($ components as $ component ) {
136
136
$ this ->addComponent ($ component );
You can’t perform that action at this time.
0 commit comments