Hi!
Inside of a slash command, I display the user a list of other users available to help him.
This is done with a selectMenu.
As soon as the users selects a value, a new channel is created with himself, and the selected person.
However, it only works for himself. The selected person returns an error Supplied parameter is not a User nor a Role. unless the user adds himself, which in this case, it works perfectly!
Am I missing a permission or something else?
Code:
const createChannel = (message, selected) => {
console.log(message.interaction.user.id); // 197011180198297610
console.log(selected); // 111204161931972608
message.guild.channels.create({
name: "test",
parent: "1039479842506297354",
permissionOverwrites: [
{
type: "member",
id: selected,
allow: [PermissionFlagsBits.ViewChannel],
},
{
type: "member",
id: message.interaction.user.id,
allow: [PermissionFlagsBits.ViewChannel],
},
{
type: "role",
id: "1039143797352837130",
deny: [PermissionFlagsBits.ViewChannel],
},
],
});
};

