Does this code still work for v14.1?

message.guild.channels.create('suggestions', {
type: 'GUILD_TEXT',
permissionOverwrites: [{
id: message.guild.id,
allow: ['VIEW_CHANNEL'],
deny: ['SEND_MESSAGES']
}]
});
message.guild.channels.create('suggestions', {
type: 'GUILD_TEXT',
permissionOverwrites: [{
id: message.guild.id,
allow: ['VIEW_CHANNEL'],
deny: ['SEND_MESSAGES']
}]
});
When trying to create a channel called suggestions?
6 Replies
d.js docs
d.js docs2y ago
• What's your exact discord.js npm list discord.js and node node -v version? • Post the full error stack trace, not just the top part! • Show your code! • Explain what exactly your issue is. • Not a discord.js issue? Check out #useful-servers.
MrMythical
MrMythical2y ago
it does not. read the update guide. use enums and name goes in options
Erin
Erin2y ago
I just read over this and I don't understand https://discordjs.guide/additional-info/changes-in-v14.html
discord.js Guide
Imagine a guide... that explores the many possibilities for your discord.js bot.
Erin
Erin2y ago
Anyone? I don't understand what they mean. I changed GUILD_TEXT to GuildText but I don't know what they mean by "name goes in options" What is options? So this?
message.guild.channels.create( {
type: 'GuildText',
name: 'suggestions',
permissionOverwrites: [{
id: message.guild.id,
allow: ['ViewChannel'],
deny: ['SendMessages']
}]
});
message.guild.channels.create( {
type: 'GuildText',
name: 'suggestions',
permissionOverwrites: [{
id: message.guild.id,
allow: ['ViewChannel'],
deny: ['SendMessages']
}]
});
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Erin
Erin2y ago
Yeah, I figured that out. ty!