Reputation: 17
I created a channel using the code below, but I can't find the channel ID to continue with the function that moves to the category and sends a message to it.
const buyid = createID
message.guild.createChannel(`venda-${buyid}`, 'text', [
{
id: message.guild.defaultRole.id,
deny: ['VIEW_CHANNEL'],
},
{
id: userID,
allow: ['VIEW_CHANNEL'],
},
])
Upvotes: 0
Views: 60
Reputation: 450
You can do futher things with a created channel when you do this:
message.guild.createChannel(`venda-${buyid}`, 'text', [
{
id: message.guild.defaultRole.id,
deny: ['VIEW_CHANNEL'],
},
{
id: userID,
allow: ['VIEW_CHANNEL'],
},
]).then((channel) => {
channel.setParent("PARENT_CHANNEL_ID")
channel.send("YOUR_MESSAGE")
})
Upvotes: 1