Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

discord.js disable “interaction failed”

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’)

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

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

>Solution :

You can use ButtonInteraction.deferUpdate(). This will not show "This interaction failed", instead it should pretty much ignore the interaction and then send the message

inter.deferUpdate();
inter.channel.send("some content")
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading