Unable to create a new channel

So I'm trying to create a new channel via
guild.channels.create({
name: "mafia",
parent: parentId,
type: ChannelType.GuildText,
permissionOverwrites: players
}).catch(e => {
interaction.followUp("An error occurred! Please try again later.")
console.log(e)
})
guild.channels.create({
name: "mafia",
parent: parentId,
type: ChannelType.GuildText,
permissionOverwrites: players
}).catch(e => {
interaction.followUp("An error occurred! Please try again later.")
console.log(e)
})
When I do this, I get an error saying Supplied parameter is not a User or a Role The value of players is shown as in the picture below. I have checked, and all ids are there. The last id is the guild ID. Any ideas on why it's throwing the error?
6 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Ashish
AshishOP2y ago
Yes Yes, I'm accessing the guild via interaction.guild, but I'll log what you asked me to
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Ashish
AshishOP2y ago
Yes
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Ashish
AshishOP2y ago
Hmm, I'll try that Looks like it works now
Want results from more Discord servers?
Add your server