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.
2 parents ce67f6c + 378d8eb commit 4ce6ad7Copy full SHA for 4ce6ad7
discord/ui/view.py
@@ -394,12 +394,15 @@ def refresh(self, components: List[Component]):
394
if item.is_dispatchable()
395
}
396
# fmt: on
397
- children: List[Item] = []
+ children: List[Item] = [item for item in self.children if not item.is_dispatchable()]
398
for component in _walk_all_components(components):
399
try:
400
older = old_state[(component.type.value, component.custom_id)] # type: ignore
401
except (KeyError, AttributeError):
402
- children.append(_component_to_item(component))
+ item = _component_to_item(component)
403
+ if not item.is_dispatchable():
404
+ continue
405
+ children.append(component)
406
else:
407
older.refresh_component(component)
408
children.append(older)
0 commit comments