[BUG] "This interaction failed" for Button Interactions
Closed this issue · 5 comments
Describe the bug
Even though I ❤️ DIH4JDA, it sometimes has it's own problems so, no matter how the code is written, either copying from the TestCommand()
example or MIY (Making It Yourself) from scratch, it will always fail to respond and just keep saying "This interaction failed"
To Reproduce
Steps to reproduce the behavior:
- Copy
TestCommand()
example into your empty java class - Run bot
- Click on either one of the two buttons
- "This interaction failed"
Expected behavior
What is supposed to happen is that the bot will successfully respond to the TestCommand()
example. Normally, if you click on the "Click me!" button, the bot will respond with "Thanks for not clicking the other button! :)" or if you click on the "NO! Click me!" button, the bot will respond with "Phew, thanks for clicking me..."
Additional context
None.
Or I maybe doin' DIH4JDA wrong but I doubt that.
Can you add this:
dih4JDA.addButtonMappings(IdMapping.of(new TestCommand(), "test-button"));
where you initialize DIH4JDA please?
Can you add this:
dih4JDA.addButtonMappings(IdMapping.of(new TestCommand(), "test-button"));where you initialize DIH4JDA please?
Thanks. Seems like it really was a "you problem" and not DIH4JDA's problem. I didn't read all the way to the end of the wiki.
I even thought about turning this into an annotation instead, as the current thingy is quite ugly tbh
I even thought about turning this into an annotation instead, as the current thingy is quite ugly tbh
please include it into the same TestCommand()
code block if you are going to turn this into an annotation.