Hello I am working on my mute command and I came up with this error:
RangeError [BITFIELD_INVALID]: Invalid bitfield flag or number.
at Function.resolve (/app/node_modules/discord.js/src/util/BitField.js:150:19)
at /app/node_modules/discord.js/src/util/BitField.js:148:54
at Array.map (<anonymous>)
at Function.resolve (/app/node_modules/discord.js/src/util/BitField.js:148:40)
at RoleManager.create (/app/node_modules/discord.js/src/managers/RoleManager.js:112:58)
at Client.<anonymous> (/app/index.js:586:41)
at Client.emit (events.js:327:22)
at MessageCreateAction.handle (/app/node_modules/discord.js/src/client/actions/MessageCreate.js:31:14)
at Object.module.exports [as MESSAGE_CREATE] (/app/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32)
at WebSocketManager.handlePacket (/app/node_modules/discord.js/src/client/websocket/WebSocketManager.js:384:31)
I want to make a mute role for my mute command here is my command:
message.guild.roles.create({
data: {
name: 'muted',
color: '#ff0000',
permissions: [
"SEND_MESSAGES" === false,
"ADD_REACTIONS" === false
]
},
reason: 'to mute people',
})
.catch(console.error);
} catch (e) {
console.log(e.stack);
}
} return message.channel.send('Cant')
I don't quite know how to fix it please help me