check if role is set to certain role ids

how do i check if the role is set to certain ids?
const role = interaction.options.getRole('role').id;
role !== '1214610538382884959' || '1171216386618572840' || '1171216297661567000'
const role = interaction.options.getRole('role').id;
role !== '1214610538382884959' || '1171216386618572840' || '1171216297661567000'
it still runs the following code in the if statement (the second line is only conditions) even though the role is equal to one in the list i have verified const role is correct and prints the correct id
6 Replies
d.js toolkit
d.js toolkit9mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by OP
kin.ts
kin.ts9mo ago
role !== id1 && role !== id2 && role !== id3
paxton!!
paxton!!OP9mo ago
yeah did that
kin.ts
kin.ts9mo ago
i think you need to use the AND operator instead of OR
paxton!!
paxton!!OP9mo ago
it needs to check each one
Unknown User
Unknown User9mo ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server