🏛️ Classes
🖱️ Interaction
Como obter: `getInteraction()` · Parâmetro dos eventos `buttonClick`, `selectMenu`
Propriedades
| Nome | Tipo | Descrição |
| customId | string | ID of the clicked component |
| values | array | Selected values (SelectMenu) |
| userId | string | ID of whoever triggered the interaction |
Métodos
| Assinatura | Parâ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