K
Kord7mo ago
Tic

Menu & Edit response

Hello I'm using a Menu to select element. When I select one element, I'm using response.edit to add an embed. But I have two problems: - My embed appears but I have the error message "Interaction failed" - How can I remove the previous menu ? (it stay present below the embed)
1 Reply
Tic
TicOP7mo ago
To remove the select menu:
response.edit {
this.components = mutableListOf()
}
response.edit {
this.components = mutableListOf()
}
About the interaction failed.
kord.on<SelectMenuInteractionCreateEvent> {
val response = interaction.deferPublicMessageUpdate() // instead of modify the first response instance
response.edit { .. }
}
kord.on<SelectMenuInteractionCreateEvent> {
val response = interaction.deferPublicMessageUpdate() // instead of modify the first response instance
response.edit { .. }
}
Want results from more Discord servers?
Add your server