如果交互(例如点击按钮)没有得到回复,discord 会在客户端显示“交互失败”
他们希望你做什么:inter.reply(‘stuff’)
我想做的事:inter.channel.send(‘stuff’)
这不是一个错误,我只是想防止出现“交互失败”,有什么办法可以做到这一点吗?
You can use ButtonInteraction.deferUpdate() https://discord.js.org/#/docs/main/stable/class/ButtonInteraction?scrollTo=deferUpdate. This will not show "This interaction failed", it replies with saying that you will edit it later[1], though it won't show any content like the Bot is thinking...
inter.deferUpdate();
inter.channel.send("some content")
[1]: You don't have to update it after
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)