If I press the button, the following error occurs: TypeError [INVALID_TYPE]: Supplied parameter is not a User nor a Role. However, I can also put a solid id there and this error still occurs.
button.guild.channels.create('cs', {
type: "text",
parent_id: '802172599836213258',
permissionOverwrites: [
{
id: button.guild.roles.everyone,
deny: ['VIEW_CHANNEL', 'SEND_MESSAGES', 'READ_MESSAGE_HISTORY']
},
{
id: button.clicker.id,
allow: ['VIEW_CHANNEL', 'SEND_MESSAGES', 'READ_MESSAGE_HISTORY']
}
]
})
The only possible problem I can see is the button.guild.roles.everyone, there's no everyone property in button.guild.roles, the everyone id is the guild id, so if you replace button.guild.roles.everyone with button.guild.id, it should fix the problem.
button.guild.channels.create('cs', {
type: "text",
parent_id: '802172599836213258',
permissionOverwrites: [
{
id: button.guild.id,
deny: ['VIEW_CHANNEL', 'SEND_MESSAGES', 'READ_MESSAGE_HISTORY']
},
{
id: button.clicker.id,
allow: ['VIEW_CHANNEL', 'SEND_MESSAGES', 'READ_MESSAGE_HISTORY']
}
]
})