How can i get all members that have a specific role?

Like the title says. Cant find anything that wroks online. I tried using this: interaction.guild.roles.cache.get('1062744014790610985').members.map(m=>m.user.username); but it gives me an error: TypeError: Cannot read properties of undefined (reading 'members').
1 Reply
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server