🔍 /
🏛️ Classes

🖱️ Interaction

Como obter: `getInteraction()` · Parâmetro dos eventos `buttonClick`, `selectMenu`

Propriedades

NomeTipoDescrição
customIdstringID of the clicked component
valuesarraySelected values (SelectMenu)
userIdstringID of whoever triggered the interaction

Métodos

AssinaturaParâmetro(s)Descrição
user() Returns the full User object of whoever triggered the interaction (async)
reply(texto, opts?) Replies. opts.ephemeral, opts.embed, opts.components
update(texto, opts?) Updates the component's own message (same opts as .reply()) — only works in response to a not-yet-answered buttonClick/selectMenu
defer(ephemeral?) Defers the reply (shows loading)
edit(texto, opts?) Edits the original reply
followUp(texto, opts?) Sends a follow-up message
showModal(modal) Opens a popup form — see the Modal section — ver modal → Modal

Exemplo de uso

on buttonClick(interaction)
  interaction.defer()
  interaction.followUp("Processando seu pedido... ⏳")
end

Funções ou páginas relacionadas