Ready listener doesn't run
Hey, my ready listener doesn't want to run and I don't know why. I'm kind of new to this framework and I copied the most things from the guide.
I've attached some screenshots with the relevant code and output.




Solution:Jump to solution
inside package.json, there should be a property called main. make sure its set to dist/index.js because sapphire uses that to determine where your commands/listeners/etc are located
4 Replies
Solution
inside package.json, there should be a property called main. make sure its set to dist/index.js because sapphire uses that to determine where your commands/listeners/etc are located
the warning for such can also be found here: https://www.sapphirejs.dev/docs/Guide/getting-started/getting-started-with-sapphire (in the first red "danger" box)
Sapphire Framework
Getting started with Sapphire | Sapphire
To install Sapphire, you need to install both discord.js and
Ah, thanks. 👍
I thought I need to set it to
src/index.ts because I'm using typescript.you can think of it as being what you pass to node, to start the bot. a perk of it is that it allows you to run
node . instead of having to pass the file yourself. node will convert the dot into what is inside that main property.