discordjs v12 check if user have role code example
Example: check member role discordjs 12
if (message.member.roles.find(r => r.name === "ROLE_NAME")) {
//Rest of your code
}
if (message.member.roles.find(r => r.name === "ROLE_NAME")) {
//Rest of your code
}