我想在您单击按钮后编辑邮件,但出现问题。
我的代码完全按照它应该的方式工作,但是每次它都说“这个交互失败了”,因为没有响应。你怎么能推迟回复那个交互而不实际回复呢?或者这甚至是可能的吗?
我只想举一个例子,说明如何做到这一点,如果不可能,又如何避免这种情况
我将其编辑为消息:
interaction.channel.messages.fetch(/*here is a message id from buttons custom id*/).then(
async ms => {
return ms.edit({ content: 'an edited responce to interaction reply' })
}
)
按钮交互无响应,显示This interaction failed
1条答案
按热度按时间yruzcnhs1#
你可以使用
ButtonInteraction#deferUpdate
。这个方法将延迟更新并重置组件的加载状态,而不会抛出This interaction failed
错误。