Why does .content not work when it is in the array?
in my example the newName shows content in it but newName.content does not give back anything
npm list discord.js and node node -v version?✅ Marked as resolved by OPmessage?
newName[4] can worknewName[4]if (interaction.commandName === 'clonechannel'){
if (!(interaction.user.id === '')) {
interaction.reply('Only the owner can use this broken command!')
return;
}
interaction.reply('What is the name you want to use?')
const filter = m => m.author.id === interaction.user.id
const newchannel = interaction.channel.clone()
.then(newchannel => {
const newChannelId = newchannel.id;
interaction.channel.awaitMessages({ filter, max: 1, time: 60000 })
.then(message => {
newName = message.first()
console.log('Cloned Channel ID:', newChannelId);
const guild = interaction.guild;
const clonedChannel = guild.channels.cache.get(newChannelId);
clonedChannel.setName(newName.content)
.catch(console.error);
interaction.channel.send('the channel has been cloned with the name of: ' + newName.content);
})
})
.catch(collected => {
interaction.channel.send('Timeout');
});
}