Iris <3
Iris <3
DIAdiscord.js - Imagine an app
Created by Iris <3 on 10/6/2024 in #djs-questions
"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:
7 replies