"cannot redeclare block-scoped variable 'data'"

do i register all of my slash commands in ready.js? i had no issues with the following: const { Events } = require('discord.js'); module.exports = { name: Events.ClientReady, once: true, execute(client) { console.log(Ready! Logged in as ${client.user.tag}); }, }; const data = new SlashCommandBuilder() .setName('syncchannel') .setDescription('Syncs the permissions of the current channel with its parent category.'); but when i try to add, const data = new SlashCommandBuilder() .setName('lock') .setDescription('Lock the channel for a specific user by removing view and send permissions.'); it gives me the error in the title. im very new to this so im sorry if this is an easy fix im just experimenting and im not sure what im doing yet. also hope i added the right tag :dogeHaHa:
5 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!
Amgelo
Amgelo3mo ago
commands should only be deployed when you know you've made changes to your commands' datas, eg. added a command, modified a name/description, added an option, etc
Iris <3
Iris <3OP3mo ago
noted
Amgelo
Amgelo3mo ago
if you're following the guide it should be descriptive on where you put your commands
Iris <3
Iris <3OP3mo ago
I FORGOT ABOUT THE GUIDE sorry im kinda not here all the way ty guys :crySparkle:
Want results from more Discord servers?
Add your server