最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - discord.js disable “interaction failed” - Stack Overflow

programmeradmin1浏览0评论

If an interaction (for example button click) is not replied, discord will display “interaction failed” in the client

What they expect you to do: inter.reply(‘stuff’)

What I want to do: inter.channel.send(‘stuff’)

This is not an error I just want to prevent “interaction failed” from showing up, is there anyway to do that?

If an interaction (for example button click) is not replied, discord will display “interaction failed” in the client

What they expect you to do: inter.reply(‘stuff’)

What I want to do: inter.channel.send(‘stuff’)

This is not an error I just want to prevent “interaction failed” from showing up, is there anyway to do that?

Share Improve this question asked Nov 9, 2021 at 18:03 SiriusmartSiriusmart 1972 silver badges13 bronze badges 2
  • So do you want to change "interaction failed" to something else or make it not showing up at all? – MegaMix_Craft Commented Nov 9, 2021 at 18:10
  • What I mean by is this i.imgur./2l6QWZm_d.webp?maxwidth=760&fidelity=grand – Siriusmart Commented Nov 9, 2021 at 18:16
Add a ment  | 

1 Answer 1

Reset to default 8

You can use ButtonInteraction.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

发布评论

评论列表(0)

  1. 暂无评论