I am trying to make a command that is only available for certain roles only. I tried checking them in an array, but it doesn't seem to work.
the command:
const Command = require("../structures/Command.js");
const config = require("../data/config.json");
module.exports = new Command({
name: "test",
description: "test",
async run(message, args, client) {
if (message.author.bot) return;
if (message.member.roles.cache.some(role => role.id === config.adminRoles)) {return message.reply("You have the admin role")} else {message.reply("No")}
}
});
config.json
{
"token": "token_go_here",
"prefix": "ab!",
"adminRoles": ["931469781234769940","931462231969910794"],
}