Commands and listeners

I've been reading the documentation for an hour and I don't really understand how the commands and listeners work. Is it possible for me to be sent the basis of a slash command and a listener that I can use?
6 Replies
KaydaFox
KaydaFox7mo ago
there's both a guide that can be found here: https://www.sapphirejs.dev/docs/Guide/getting-started/getting-started-with-sapphire and also there's a repo with a bunch of examples on how to do things ^^ https://github.com/sapphiredev/examples
Sapphire Framework
Getting started with Sapphire | Sapphire
To install Sapphire, you need to install both discord.js and
GitHub
GitHub - sapphiredev/examples: Various examples of setting up your ...
Various examples of setting up your bot with the Sapphire Framework - sapphiredev/examples
NXFASTE
NXFASTE7mo ago
Thank you!
NXFASTE
NXFASTE7mo ago
No description
NXFASTE
NXFASTE7mo ago
Why it doesn't work? And how SapphireJS knows the event is a ready event and not guildMemberAdd event or messageUpdate event?
KaydaFox
KaydaFox7mo ago
because theyre the events emitted fo discordjs. it knows which events each listener belongs to based on the filename or the "event" name for the listener did you set the right "main" property in package.json?
secre
secre7mo ago
https://sapphirejs.dev/docs/Guide/listeners/creating-your-own-listeners#creating-a-listener-class few words below you can see note If you pay attention to the example, the "event" field is unnecessary. This allows you to omit constructors when the file name matches the event's name and no other options need to be changed.
Want results from more Discord servers?
Add your server