pub fn component(component: &Component) -> Result<(), ComponentValidationError>
๐Deprecated: Use component_v1 for old components and component_v2 for new ones
Expand description
Ensure that a top-level request component is correct in V1.
Intended to ensure that a fully formed top-level component for requests is an action row.
Refer to other validators like button
if you need to validate other
components.
ยงErrors
Returns an error of type InvalidRootComponent
if the component is not an
[ActionRow
].
Refer to action_row
for potential errors when validating an action row
component.