I ran into a problem. I want to add an array of users to the channel rights. Everything is fine on pure js. But as soon as I do it on nestjs (typescript), it throws an error - Type '{ id: string; allow: string[]; }' is not assignable to type 'OverwriteResolvable'.
Code:
let stagechannel = interaction.guild.channels.cache.get('1012807170393378927')
let ticketsSupportRoles = [
"772447005297475626",
]
let supportRoles = ticketsSupportRoles.map(x => {
return {
id: x,
allow: ["ViewChannel"]
};
})
stagechannel.edit({
permissionOverwrites: [
{
id: interaction.guild.id,
allow: ['Connect', 'ViewChannel'],
deny: ['MoveMembers', 'ModerateMembers', 'MuteMembers', 'ManageChannels', 'MentionEveryone']
},
...supportRoles
],
})
Complains about - supportRoles (Type '{ id: string; allow: string[]; }' is not assignable to type 'OverwriteResolvable'.)