Cyanic76 / discord-modmail

THIS IS A MIRROR. ISSUES AND PR MUST BE SUBMITTED TO CODEBERG.
https://codeberg.org/Cyanic76/discord-modmail
MIT License
77 stars 48 forks source link

Cannot read property 'send' of undefined #23

Closed UsedSpxse closed 3 years ago

UsedSpxse commented 3 years ago

I am getting an error saying:

(node:520) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'send' of undefined

I tried uninstalling and reinstalling discord.js and it still errors out. This is believed to be where it is erroring out.

      message.author.send(`Thanks for contacting the support team! We'll get back to you quickly.\nYour ticket ID is #${actualticket}.`)
  Please help!
Cyanic76 commented 3 years ago

I believe it's a client.channels.cache.get("...").send(...) function doing this.

Related to #9, #13, #15 & #18

I'm thinking the bot didn't register the channel to its cache.

Cyanic76 commented 3 years ago

Hi, #23 author, can you test again?