K
Kord5mo ago
Tic

Multiplatform interface problem

Hello Maybe you already have this type of issue and can help me I have the error:
JavaScript name addComponent_948tyo$ is generated for different inherited members: suspend fun addComponent(component: InteractionComponent): Boolean and suspend fun addComponent(component: InteractionRowComponent): Boolean
JavaScript name addComponent_948tyo$ is generated for different inherited members: suspend fun addComponent(component: InteractionComponent): Boolean and suspend fun addComponent(component: InteractionRowComponent): Boolean
With my interface:
interface GlobalMessageBuilder: ComponentMessageBuilder, RowComponentMessageBuilder
interface GlobalMessageBuilder: ComponentMessageBuilder, RowComponentMessageBuilder
And ComponentMessageBuilder & RowComponentMessageBuilder are interface that extend
interface MessageBuilder<C: Component<*>> {

suspend fun addComponent(component: C): Boolean

suspend fun addComponents(components: Collection<C>): Boolean

suspend fun removeComponent(id: String): Boolean

suspend fun removeComponents(ids: Collection<String>): Boolean

suspend fun containsComponent(id: String): Boolean

suspend fun sizeComponents(): Int

suspend fun removeComponents()
}
interface MessageBuilder<C: Component<*>> {

suspend fun addComponent(component: C): Boolean

suspend fun addComponents(components: Collection<C>): Boolean

suspend fun removeComponent(id: String): Boolean

suspend fun removeComponents(ids: Collection<String>): Boolean

suspend fun containsComponent(id: String): Boolean

suspend fun sizeComponents(): Int

suspend fun removeComponents()
}
I tried to override the function and put @JsName but it's not allowed on override functions
2 Replies
LustigerLurch
LustigerLurch5mo ago
what's the hierarchy between Component, InteractionComponent and InteractionRowComponent?
Tic
TicOP5mo ago
Just interface that extend MessageBuilder with a type
Want results from more Discord servers?
Add your server