#you didn t resolve the promise

1 messages · Page 1 of 1 (latest)

oak radish
#

how can I do this?

raven lynxBOT
#

mdn await
The await operator is used to wait for a Promise. It can only be used inside an async function within regular JavaScript code; however it can be used on its own with JavaScript modules.

oak radish
#

so basically I have to resolve the promise and it will work?

lean garnet
#

yeah bc Promise.channel is undefined but Message.channel is (in guilds)

oak radish
#

so it should be

#

here the error occurres

lean garnet
#

yeah msg is a Message Promise not a message

oak radish
#

so await message.channel...

lean garnet
#

that's no how it works

#

put await when you send the message

oak radish
#

hmm

#

hard one xD

lean garnet
#

bruh

#

const msg = await channel.send(whatever)

#

wait a minute you're in a dm right?

#

DM channels aren't cached by default you need to Enable the Channel partial

oak radish
#

yes im dming users

#

with the captcha

oak radish
#

works, thanks a lot