Button handler not triggering
Heyah @Helpers I basically added a button handler from https://www.sapphirejs.dev/docs/Guide/application-commands/interaction-handlers/buttons in
/listeners
and changed the example's button ID with the one from
but interaction just fails on click and im not too sure how to debug this - nothing else happens on logs beside Loaded 26 listeners
:/ Any idea how to debug and maybe even fix?Sapphire Framework
Buttons | Sapphire
Buttons are components that are clickable. You will recieve an interaction for every click of a button! Here's an
13 Replies
interaction handlers do not go in the listeners folder
also please dont ping the role with every question! You should ping it if you dont get a response for a while
You should read https://www.sapphirejs.dev/docs/Guide/application-commands/interaction-handlers/what-are-they first
Sapphire Framework
What are they? | Sapphire
These are interaction handlers! A simple class you can extend to handle almost all the interactions you may receive in
oh my bad - could we please make this clearer in new post guidelines? 😇
Yeah, I'll update it to make it a bit clearer dw
done
awesome and thanks for the doc link, it works now
One more thing, what are the listeners, preconditions and arguments that are logged as loaded on bot startup? is there a list somewhere to know what actually happened?
Most of those are preincluded pieces we provide for most common checks and features
is there a list on docs? couldnt find smth that looks like it
I dont think we document a list of it but you can always check it on the github repo!
if so just confirm i will keep looking
fair!
thanks again
for arguments, its not really...useful, but things like preconditions are
yeah will dive into preconds pretty soon - guards have been a B to implement on bare discordjs
What I can say is the listeners we load handle the following
- initializing command registries and registering commands
- parsing interactions received and mapping them according to their types (interaction handlers, commands, etc)
- optionally, if enabled, the listeners that help parse a received message and run the command for it
As for preconditions, https://github.com/sapphiredev/framework/tree/main/src/preconditions
GitHub
framework/src/preconditions at main · sapphiredev/framework
Discord bot framework built on top of discord.js for advanced and amazing bots. - framework/src/preconditions at main · sapphiredev/framework