Commands not working
I created a command and it won't work.
31 Replies
I created a command the bot would initialise and start but I don't think so the commands are being loaded
it doesn't work with a default prefix i am initialising it with
@bot command
worksTag suggestion for @Acronie:
When asking for help, make sure to provide as much detail as possible. What have you tried so far? Do you have stacktraces that you can show us? What are you trying to achieve? Try to answer these questions and others, so we do not have to ask for them afterwards.
❯ For a good guide on how to ask questions, see the instructions that StackOverflow gives. You should try to always follow these guidelines. ❯ For an excellent video that shows how not to ask technical questions is this, watch this YouTube video by LiveOverflow. ❯ Asking technical questions (Clarkson) ❯ How to ask questions the smart way (Raymond)
Uhg
What's the stupid tag for sapphire support questions
- Did you use a folder of the examples repository or did you use the CLI to generate your bot?
- What's your file/folder structure?
- What's your "main" property in
package.json
- Are you using TypeScript? And if so, how are you compiling and running your code?
- Are you using the version 2 or version 3 of @sapphire/framework
?
- In case you are using version 3 of @sapphire/framework
, and your problem related to message commands, did you add loadMessageCommandListeners
to your SapphireClient
options
Remember that if you are new to @sapphire/framework
it is important that you read the user guide.Yes that thanks
regular-problems
ftwDumb name
loaded the messgeCommandListeners
file structure is fine too
![](https://utfs.io/f/8d7643ba-1590-422d-b348-ab0f800e8e52-1nq2cb.png)
"main": "dist/index.js",
main too
and using tsc-watch
which is fien tooDo you have the message content intent in the dev panel?
(Its a priviledged intent)
yes
it works
@bot command
but not with the default prefixDiscord gives the bot the message content regardless if you ping it, so it not working suggests that it doesnt have the message content intent
No i am saying the command works when I ping it and use the command
so it has the message content
it doesn't work when I use the prefix
.command
If you ping the bot or it has the priviledged intent it gets message content, otherwise it does not
You need to flick the switch on the developer panel