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
"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
oh
works thanks
also is their any help with reactions
as I am using the old message thingy I wanna use reactions
is it available in the framework>'
Wdym old message thingy and use reactions. Do you mean buttons?
Anyway the framework supports everything that djs does, and djs supports buttons
Do you mean buttonsnot buttons normal reactions isn't buttons limited to the slash commands?
No
No
oh icc didn't knew that
And reactions have been around for like 7 years. Literally longer than sapphire even exists. Ofc it supports them.
I didn't mean "support" I meant like some util functiins to make it easier
and I have to write less code 😛
@sapphire/discord.js-utilities
Discord.js specific utilities for your JavaScript/TypeScript bots
❯ Author: sapphiredev
❯ Maintainers: favna, kyranet, and vladfrangu
❯ Latest version: 5.1.2
❯ License: MIT
❯ Date Created: <t:1609519287:d>
❯ Date Modified: <t:1671410032:d>
Dependencies:
@sapphire/discord-utilities, @sapphire/duration, @sapphire/utilities, and tslib
Do buttons go in
/buttons
in file treeDocumentation suggestion for @Acronie:
<:_:746069730170896405> Sapphire guide results:
Interactions Handlers / Buttons
doesn't say anything ;p
It does
You could try and bother clicking around
Solution
We didn't write the guide for it to be blatantly ignored