Skip to content

Commit f1b2adf

Browse files
committed
Fix get_components_ids when passing rows with URL ButtonStyle
1 parent 859beb6 commit f1b2adf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

discord_slash/utils/manage_components.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,8 @@ def get_components_ids(component: typing.Union[str, dict, list]) -> typing.Itera
215215
yield component
216216
elif isinstance(component, dict):
217217
if component["type"] == ComponentType.actionrow:
218-
yield from (comp["custom_id"] for comp in component["components"])
219-
else:
218+
yield from (comp["custom_id"] for comp in component["components"] if "custom_id" in comp)
219+
elif "custom_id" in component:
220220
yield component["custom_id"]
221221
elif isinstance(component, list):
222222
# Either list of components (actionrows or buttons) or list of ids

0 commit comments

Comments
 (0)