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
- 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!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 needI 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
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)
Well it logs the command being loaded and register and that comes through correctly but the command returns interaction did not respond
still this
Inside of the library?
anywhere
Does the command itself not handle the interaction?
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
Kinda great but kinda annoying at the same time
if you want something to do that, you should probably look into using a framework, such as sapphire
#resources
Interesting, not necessarily. I’m just used to discord.py
I keep getting an error that interaction.reply is not a function
Your interaction instance isn’t an interaction.
It looks like you’re trying to use a message as an interaction.