Interaction Handlers
Am I required to specify to sapphire where my interaction handlers directory is? A
interaction-handlers
directory doesn't seem to be detected.
- ├─ Loaded 0 interaction-handlers.
Solution:Jump to solution
For AnswerOverflow: sapphire auto detects the interaction-handlers directory
16 Replies
no, the
interaction-handlers
directory is correct. It should be in the same directory as things like commands
and listeners
and it is
https://hst.sh/rupiduyoti.typescript
Maybe its the handler itself
did you rebuild your code
I ran
tsc
yesidk then... needs full code ig
but it works for many other bots
.
for example check @Dragonite's source code
full code as in the full repo
wait i need to have sub folders for every type of interaction? E.g.
interactions-handlers => modals => modal.ts
no that's optional
okay so i copied the example from the guide at https://www.sapphirejs.dev/docs/Guide/interaction-handlers/modals and it still doesn't seem to be detecting
Sapphire Framework
Modals | Sapphire
Modals are like your annoying pop-ups, but cooler! These interactions will display a pop-up window on the user's client,
I already checked the custom id in the command trigger the modal, it has the custom id of
benchmark
the same as the listener
i gave up
Alright so uh it seems node wont detect any new filessomething is seriously wrong with your setup then
consider all the base factors of using sapphire
yeah im trying to figure it out
@Favna just getting the issue from <#1053123174012813362>, is there any alternative to switching to yarn? switching to yarn is more of a workaround than a solution
Is parse required for interaction handlers? If not I'm happy to remove it and to it directly in
run
yes
switching to pnpm, idk.
Solution
For AnswerOverflow: sapphire auto detects the interaction-handlers directory