Getting: Invalid bitfield flag or number: VIEW_CHANNEL. (creating a text channel)

dont rlly know. code:
collector.on('collect', async(i) => {
const selection = i.values.join(', ')
if(selection==='report') {
i.guild.channels.create({
name: `report-ticket-${i.user.tag}`,
type: ChannelType.GuildText,
parent: ticketCategory,
permissionOverwrites: [
{
id: i.guild.roles.cache.find(r => r.name==='@everyone').id,
deny: ['VIEW_CHANNEL'],
}
]
})
}
})
collector.on('collect', async(i) => {
const selection = i.values.join(', ')
if(selection==='report') {
i.guild.channels.create({
name: `report-ticket-${i.user.tag}`,
type: ChannelType.GuildText,
parent: ticketCategory,
permissionOverwrites: [
{
id: i.guild.roles.cache.find(r => r.name==='@everyone').id,
deny: ['VIEW_CHANNEL'],
}
]
})
}
})
3 Replies
d.js toolkit
d.js toolkit10mo 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
d.js docs
d.js docs10mo ago
RangeError [BitFieldInvalid]: Invalid bitfield flag or number: undefined - All SCREAMING_SNAKE_CASE enums have been changed to PascalCase - Intents: Intents.FLAGS.GUILD_MESSAGES -> GatewayIntentBits.GuildMessages - Permissions: Permissions.FLAGS.SEND_MESSAGES -> PermissionFlagsBits.SendMessages
snowyv4
snowyv4OP10mo ago
Ah, it's ViewChannel. Thanks.
Want results from more Discord servers?
Add your server