Estoy trabajando en un bot que tiene una interacción de solicitud y quiero verificar si el usuario que interactúa tiene un rol determinado. Sigo recibiendo este bloqueo:
TypeError [INVALID_TYPE]: Supplied roles is not a Role, Snowflake or Array or Collection of Roles or Snowflakes.Aquí está el código:
client.on("interactionCreate", interaction => { if (interaction.isButton() && interaction.customId === 'request') { if (interaction.member.roles.cache.find(r => r.id === 'ROLEID') { const bannedRequestEmbed = { "title": "Request", "description": "Sorry, but you are no longer allowed to send requests.", "color": 16711680} interaction.reply({ embeds: [bannedRequestEmbed], ephemeral: true }) } }