Dont understand the guide

so im tryna learn how to code a bot discord but i need several help haha... so im at that screen in the steps, and i dont understand where i need to put those, and why when im tryna /ping w my bot that dosnt work
6 Replies
d.js toolkit
d.js toolkit17mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Post the full error stack trace, not just the top part! - Show your code! - Explain what exactly your issue is. - Not a discord.js issue? Check out #useful-servers. - Issue solved? Press the button!
s a k a  t a
s a k a t aOP17mo ago
maybe im just dumb idk
Squid
Squid17mo ago
Top code block should be a file in your commands directory Bottom code block should be in your index file
s a k a  t a
s a k a t aOP17mo ago
thanks man i dont really understand the point of the second block can you explain ? :/
Squid
Squid17mo ago
When someone uses a slash command (creates a chat input command interaction), it searches your client.commands collection to find the file where you handle that specific command, and it calls that file's execute() method to run the code in that file (like replying to the interaction)
s a k a  t a
s a k a t aOP17mo ago
thanks thats clear now
Want results from more Discord servers?
Add your server