#Channel mention

1 messages · Page 1 of 1 (latest)

haughty crest
dawn quail
#

On line 20, you have the creation of the channel, msg.guild.channels.create(...) returns a promise with the Channel that was created

haughty crest
#

how do i get the id of the channel?

dawn quail
#

<Channel>.id

haughty crest
#

will that be inside the create()

dawn quail
#

nonono
you need to resolve the promise into a variable
like const channel = await msg.guild....

then channel.id if you want the id
or message.reply(`created ${channel}`)

haughty crest
#

it comes up with "created [object Promise]"

dawn quail
#

did you use await?

haughty crest
#

on the reply?

dawn quail
#

no, like i have it above

haughty crest
#

oh ok

#

i see it now

#

tysm that worked

dawn quail
#

cool, thats how you can await promises and resolve them, useful to remember

haughty crest
#

that worked ty