Typescript Error 'typeof Client' incorrectly extends base class
Hi! Recently updated some packages and started running into this ts build error:
Packages list:
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]
4 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!
- ✅
Marked as resolved by OPIn case it is relevant, my tsconfig is pretty simple:
Well, I jumped forward from typescript 5.2.0-dev.20230804; it being a weird dev build was one of the reasons I updated. I'll try reverting to those other versions and get back to you
Looks like 5.5 works.
Now I just gotta typeguard my message.channel.sends
Let me check. The method I am using this in has the param specified as a TextBasedChannel, since that's what I was getting at the time
So maybe I just need to update the param type
Getting it from an interaction
Still looks like a TextBasedChannel type
Sorry, I was mixing two seperate examples. In one example, it's an interaction.channel, in the other it's a message coming from a messagecreate event
Most of my bot has been updated to use slash commands, but I still have some that just read chat
Either way, I'll be using that isSendable()
Thank you for your help
And bots don't get permission to send messages in GroupDMs?
I assume
👍🏻
Again, I appreciate your help
I thought I had, but I can double check later
Thanks for the follow-up