#channel.send() is not a function
37 messages Ā· Page 1 of 1 (latest)
what is channel?
would need to see the rest of that line
Channel is a channel created by a command
(ModMail system)
can u show rest of line?
what is before then
nah thats enough to say why this is wrong
Like I said, it worked earlier today
By chaining a second .then what you get is the return value of the first .then
Which is a message, not a channel
so how would I fix this
return chanel in first then
Dont shadow the channel variable, or just dont use multiple thens
This is where async/await starts to become a much nicer syntax
Your final third .then is wrong too
Not a callback method
You could do .then(message => message.channel.send in the middle one
It wont let me
just use await
What would that do to return it
Resources to understand Promise:
⢠MDN: learn more
⢠Guide: learn more
⢠JavaScript info: learn more
I said how
Literally this
It returns a message so treat it like a message
Ok
so its working
Yes