We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e62aa8c commit ef555eeCopy full SHA for ef555ee
src/Discord/Parts/Interactions/Request/Component.php
@@ -94,7 +94,7 @@ protected function getComponentsAttribute(): ?ExCollectionInterface
94
$components = Collection::for(Component::class, null);
95
96
foreach ($this->attributes['components'] ?? [] as $component) {
97
- $componentType = $component->type ?? 0;
+ $componentType = (is_object($component)) ? (isset($component->type) ? $component->type : 0) : ($component['type'] ?? 0);
98
$components->pushItem(
99
$this->createOf(
100
isset(ComponentBuilder::TYPE_CLASSES[$componentType])
0 commit comments