error

im new and i need help on this error
15 Replies
d.js toolkit
d.js toolkit3mo 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! - Marked as resolved by staff
Zey
ZeyOP3mo ago
No description
Unknown User
Unknown User3mo ago
Message Not Public
Sign In & Join Server To View
Zey
ZeyOP3mo ago
ok
Unknown User
Unknown User3mo ago
Message Not Public
Sign In & Join Server To View
Zey
ZeyOP3mo ago
require('dotenv').config(); const { REST, Routes } = require('discord.js'); const commands = [ { name: '-bot', description: 'Im ready!', }, { name: '-bot 3', description: 'Ready!', }, ]; const rest = new REST({ version: '10' }).setToken(process.env.TOKEN); (async () => { try { console.log('Registering slash commands...'); await rest.put( Routes.applicationGuildCommands( process.env.CLIENT_ID, process.env.GUILD_ID ), { body: commands } ); console.log('Slash commands were registered successfully!'); } catch (error) { console.log(There was an error: ${error}); } })(); this is the code
Unknown User
Unknown User3mo ago
Message Not Public
Sign In & Join Server To View
treble/luna
treble/luna3mo ago
also im pretty sure - is not an allowed character in names
Unknown User
Unknown User3mo ago
Message Not Public
Sign In & Join Server To View
Zey
ZeyOP3mo ago
what is file tree? this?
No description
Unknown User
Unknown User3mo ago
Message Not Public
Sign In & Join Server To View
d.js docs
d.js docs3mo ago
guide suggestion for @Zey: :guide: Home: Introduction - Before you begin... read more
Unknown User
Unknown User3mo ago
Message Not Public
Sign In & Join Server To View
Zey
ZeyOP3mo ago
No i was watching a youtube video OK
treble/luna
treble/luna3mo ago
this is why you should not follow youtube videos. Follow the guide, as told, and make sure you have a basic js understanding as your error is pretty basic js
Want results from more Discord servers?
Add your server