25 lines
1.1 KiB
Java
25 lines
1.1 KiB
Java
package com.discord.models.botuikit;
|
|
|
|
import com.discord.models.botuikit.ActionInteractionComponentState;
|
|
import d0.z.d.m;
|
|
/* compiled from: MessageComponent.kt */
|
|
public final class MessageComponentUtils {
|
|
public static final MessageComponentUtils INSTANCE = new MessageComponentUtils();
|
|
|
|
private MessageComponentUtils() {
|
|
}
|
|
|
|
public final ActionInteractionComponentState.Failed getChildError(LayoutMessageComponent layoutMessageComponent) {
|
|
m.checkNotNullParameter(layoutMessageComponent, "$this$getChildError");
|
|
for (MessageComponent messageComponent : layoutMessageComponent.getChildren()) {
|
|
if (messageComponent instanceof ActionMessageComponent) {
|
|
ActionInteractionComponentState stateInteraction = ((ActionMessageComponent) messageComponent).getStateInteraction();
|
|
if (stateInteraction instanceof ActionInteractionComponentState.Failed) {
|
|
return (ActionInteractionComponentState.Failed) stateInteraction;
|
|
}
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
}
|