[INVALID_TYPE]: Supplied parameter is not a User nor a Role

44 Views Asked by At

I belive my error is on this lines of code since is only where I call the permissionOverwrites method from the discordjs.

interaction.guild.channels.create(`ticket-${interaction.user.username}`, {
    parent: client.config.parentOpened,
    topic: interaction.user.id,
    type: 'GUILD_TEXT',
    permissionOverwrites: [{
        id: interaction.user.id,
        allow: ['SEND_MESSAGES', 'VIEW_CHANNEL'],
      },
      {
        id: client.config.roleSupport,
        allow: ['SEND_MESSAGES', 'VIEW_CHANNEL'],
      },
      {
        id: interaction.guild.roles.everyone,
        deny: ['VIEW_CHANNEL'],
      },
    ],
  })
0

There are 0 best solutions below