I made in my discord.js bot, command "nuke", which makes channel with same: name, permissions, topic etc, and delete "original" channel. But there is one problem, how to make channel in same position as "original"?
Here's my code:
const Discord = require('discord.js')
module.exports = {
name: 'nuke',
execute(message) {
if (!message.member.hasPermission('ADMINISTRATOR')) {
message.channel.send('missing permissions')
}
message.channel.clone().then(msg => msg.send('nuked'))
message.channel.delete()
},
};