Slash Command Registration & Loading Library

https://github.com/Vanillaanarchy-net/utility-discord-bot/ The commands are registering but they are returning interaction did not respond every time
GitHub
GitHub - Vanillaanarchy-net/utility-discord-bot
Contribute to Vanillaanarchy-net/utility-discord-bot development by creating an account on GitHub.
15 Replies
d.js toolkit
d.js toolkit5mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
duck
duck5mo ago
I don't see any code in this repo for receiving and handling command interactions I only see you listening to the messageCreate event and attempting to treat slash commands as text commands with the prefix ! slash commands use interactions, and interactions aren't messages therefore you aren't responding to any command interactions as a side note, you should reconsider your intents it doesn't appear as if you're using most of them, and it's heavily recommended that you only use the ones you need
ZeroInfinity
ZeroInfinity5mo ago
I don’t remember why the prefix command handling is even there Do you see any issues with the command registration / loading For slash commands Yea I will remove the ones I am not using
duck
duck5mo ago
no, but that doesn't seem related to your issue you just need to listen for and handle command interactions definitely if you're able to attempt to use a command and its options are as expected, the issue wouldn't be with the registration the easiest way to find out whether the issue is with loading would be to just log the loaded commands (or log if a command isn't found upon receiving a command interaction)
ZeroInfinity
ZeroInfinity5mo ago
Well it logs the command being loaded and register and that comes through correctly but the command returns interaction did not respond
duck
duck5mo ago
still this
ZeroInfinity
ZeroInfinity5mo ago
Inside of the library?
duck
duck5mo ago
anywhere
ZeroInfinity
ZeroInfinity5mo ago
Does the command itself not handle the interaction?
duck
duck5mo ago
no, discord.js does not take any actions, listen to any events, read your files, or read your custom properties for you it's just an api wrapper
ZeroInfinity
ZeroInfinity5mo ago
Kinda great but kinda annoying at the same time
duck
duck5mo ago
if you want something to do that, you should probably look into using a framework, such as sapphire #resources
ZeroInfinity
ZeroInfinity5mo ago
Interesting, not necessarily. I’m just used to discord.py I keep getting an error that interaction.reply is not a function
SpecialSauce
SpecialSauce5mo ago
Your interaction instance isn’t an interaction. It looks like you’re trying to use a message as an interaction.
d.js docs
d.js docs5mo ago
guide Creating Your Bot: Command handling - Receiving command interactions read more