E
E
Egor2020-10-29 17:47:56
Node.js
Egor, 2020-10-29 17:47:56

How to get the ID of the created channel?

Hello, I'm doing this with a Discord.js bot.
I wrote the code for creating a channel, namely: How can I get the ID of this channel without using message.guild.channels.find?
message.guild.channels.create('bot');

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2020-10-29
@KenKup11

const new_channel = message.guild.channels.create('bot').then(result => {
    console.log('ID канала:', result.id)
})

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question