#help
1 messages · Page 1 of 1 (latest)
when i run the command first time it works
then i go to the new channel
it errors once i run it the 2nd time
@storm path how to fix? i never encountered such error
are you sure you are not sending any other message into that channel
yes
will try
that way we can know which one errored
const name = 'clear';
module.exports = async (message, args) => {
if (!message.member.permissions.has("MANAGE_CHANNELS")) return message.reply("you don't have the permission for that.");
if (!message.guild.me.permissions.has("MANAGE_CHANNELS")) return message.channel.send("I don't have the permission for that.");
try {
await message.channel.clone({position: message.channel.rawPosition }).then(ch => { ch.send('Channel nuked'); })
console.log(`${message.member.user.tag} executed command '!${name}'. Take cover!`)
} catch (err) {
console.log(`${message.member.user.tag} executed command '!${name}', but it didn't work!`)
}
await message.channel.delete();
};
``` like this? @storm path