Hello there!
I have my discord code under that is supposed to create a new channel but, it does nothing and the console isn't reporting errors...
Look at it :
if (message.content.toLowerCase().startsWith(!tournoi-fn) == '!tournoi-fn') {
let channelName = args.slice(1).join(' ');
message.channel.send('Channel created as :', channelName);
message.guild.createChannel(channelName, 'text', {
permissionOverwrites: [{
id: message.guild.roles.cache.find( r => r.id('855045656409276446')),
allow: ['VIEW_CHANNEL', 'SEND_MESSAGES', 'READ_MESSAGE_HISTORY'],
id: message.guild.roles.cache.find( r => r.id('848565653463629894')),
deny: ['VIEW_CHANNEL', 'SEND_MESSAGES', 'READ_MESSAGE_HISTORY'],
}]
})
.then(console.log)
.catch(console.error);
Tell me if you know why,
Thanks!
I have my discord code under that is supposed to create a new channel but, it does nothing and the console isn't reporting errors...
Look at it :
if (message.content.toLowerCase().startsWith(!tournoi-fn) == '!tournoi-fn') {
let channelName = args.slice(1).join(' ');
message.channel.send('Channel created as :', channelName);
message.guild.createChannel(channelName, 'text', {
permissionOverwrites: [{
id: message.guild.roles.cache.find( r => r.id('855045656409276446')),
allow: ['VIEW_CHANNEL', 'SEND_MESSAGES', 'READ_MESSAGE_HISTORY'],
id: message.guild.roles.cache.find( r => r.id('848565653463629894')),
deny: ['VIEW_CHANNEL', 'SEND_MESSAGES', 'READ_MESSAGE_HISTORY'],
}]
})
.then(console.log)
.catch(console.error);
Tell me if you know why,
Thanks!