![JAR search and dependency download from the Maven repository](/logo.png)
io.github.freya022.botcommands.api.components.EntitySelectMenu.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of BotCommands Show documentation
Show all versions of BotCommands Show documentation
A Kotlin-first (and Java) framework that makes creating Discord bots a piece of cake, using the JDA library.
package io.github.freya022.botcommands.api.components
import io.github.freya022.botcommands.api.components.event.EntitySelectEvent
import io.github.freya022.botcommands.internal.components.controller.ComponentController
import io.github.freya022.botcommands.internal.utils.throwInternal
import net.dv8tion.jda.api.interactions.components.selections.EntitySelectMenu as JDAEntitySelectMenu
class EntitySelectMenu internal constructor(
private val componentController: ComponentController,
override val internalId: Int,
private val selectMenu: JDAEntitySelectMenu
) : JDAEntitySelectMenu by selectMenu, IdentifiableComponent {
override fun withDisabled(disabled: Boolean): EntitySelectMenu {
return EntitySelectMenu(componentController, internalId, super.withDisabled(disabled))
}
override fun getId(): String = selectMenu.id ?: throwInternal("BC components cannot have null IDs")
@JvmSynthetic
override suspend fun await(): EntitySelectEvent = componentController.awaitComponent(this)
override fun equals(other: Any?): Boolean {
if (this === other) return true
if (javaClass != other?.javaClass) return false
other as EntitySelectMenu
return selectMenu == other.selectMenu
}
override fun hashCode(): Int {
return selectMenu.hashCode()
}
override fun toString(): String {
return selectMenu.toString()
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy