I am trying to put many saved discord role ID's into a channel, they are all saved into mongo, but when I put something in it says it is not a user nor a role, this is what I tried to do:
const results = await addmodSchema.findOne({
_id: guild.id
})
ButtonInteraction.guild.channels.create(`${ButtonInteraction.user.tag}`, {
type: "text",
permissionOverwrites: [
{
id: ButtonInteraction.user.id,
allow: ['VIEW_CHANNEL', 'SEND_MESSAGES', 'READ_MESSAGE_HISTORY'],
},
{
id: ButtonInteraction.guild.roles.everyone,
deny: ['VIEW_CHANNEL', 'READ_MESSAGE_HISTORY']
},
{
id: results.foreach(roles),
allow: ['VIEW_CHANNEL', 'READ_MESSAGE_HISTORY', 'MANAGE_CHANNEL']
}
],
})