Slashcommands with API
Hi, i tried to create a SlashCommand which gets data from https://brawlhalla.fly.dev/v1/glory/id?brawlhalla_id=3145331 but idk why the slash command doesnt work. (im new to js)
18 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!
- ✅
Marked as resolved by OP[email protected]
Node.js v20.14.0
Explain "doesn't work" how?
forgot to send mb
not responding*
That tells us nothing, what errors you get in console? If any. Also you are fetching from an API there, which can take more than 3s, so you might wanna defer before that, and then edit the response after getting your data
console is saying "No command matching glory was found."xd
im gonna try that ty
That looks like a custom error, show the full error stack instead of just describing it, also show your interaction handler
theres no full error stack, thats the only output, or im too stupid to find it. xd
deploy-commands.js
index.js
your command isnt being picked up by the handler
can you show your file tree, where the file is located exactly
anyone else with advice? 🙂
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
alr ty
@rmHawk765 tysm, it worked ❤️
nvm, new problem, i updated the handler with recursive. i added a 2nd command with same nearly same api usage.
And ive the same problem "No command matching stats was found." i dont understand why its the same problem and why stats is not working but my other command from the top is.
the data from my first command looks like that
and the data from my new command like that
im too stupid to understand that
What error ur receiving?
Theres no error, the command handler wont register the command
Had the same Problem with my first command, but fixed it and now i have the same Problem again
Try console logging every command path to check if he finds the command or no