#errorssssssssssssss and idk how
11 messages · Page 1 of 1 (latest)
exact discord.js version is 14.6.0
exact node.js version is 18.12.1
const { clientId, guildId, token } = require('./token.json');
const fs = require('node:fs');
const commands = [];
const commandFiles = fs.readdirSync('./commands').filter(file => file.endsWith('.js'));
for (const file of commandFiles) {
const command = require(`./commands/${file}`);
commands.push(command.data.toJSON());
}
const rest = new REST({ version: '10' }).setToken(token);
(async () => {
try {
console.log(`Started refreshing ${commands.length} application (/) commands.`);
const data = await rest.put(
Routes.applicationGuildCommands(clientId, guildId),
{ body: commands },
);
console.log(`Successfully reloaded ${data.length} application (/) commands.`);
} catch (error) {
console.error(error);
}
})();
this is deploy-commands.js
does anyone know whats wrong?
command.data is undefined. one or more of your commands don't have a data property
that's the problem then, when i add `data: new SlashCommandBuilder() i have to change everything like name description permission and stuff and when I do that it doesn't work either
@fresh rose
one of your commands does not have a data property. im right here you dont need to ping me
let me try something else