TS Error: The property "isReady" / "token" is not available for the "myClient" type.

I've made my own TS Client class which extends djs' Client class but it keeps giving me an error which has to do with the Client class from djs I suppose. Any ideas how to fix this?
import { Client } from "@discordjs/core";

export class myClient extends Client {
async myFunction(...) {
if (!(this.isReady() || this.token))
// The property "isReady" / "token" is not available for the "myClient" type.
}
}
import { Client } from "@discordjs/core";

export class myClient extends Client {
async myFunction(...) {
if (!(this.isReady() || this.token))
// The property "isReady" / "token" is not available for the "myClient" type.
}
}
16 Replies
d.js toolkit
d.js toolkit6mo ago
- 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 OP
Svitkona
Svitkona6mo ago
are you using @discordjs/core on purpose?
LukeZ
LukeZOP6mo ago
yes since I don't need the rest of djs I only need rest and core
Svitkona
Svitkona6mo ago
core's Client doesn't have isReady/token
LukeZ
LukeZOP6mo ago
oh anyways, I changed the project type to JS but I'm now running into another error: IT says that the Client is not a constructor.
Svitkona
Svitkona6mo ago
can you show your code? is it just the same as above?
LukeZ
LukeZOP6mo ago
1. yes 2. no, gimme a moment (I didn't name it that way, it was just an alias) I'm having another issue, I will try to fix it and ask again if I'm still facing issue - thank you all ^^ okay, I fixed it now but there is an issue with installing the whole thing. I have an old version installed in my project but when I try to update it, it installs an old version (0.5.4) instead of the newest (0.6.1). Any ideas on this? I even tried reinstalling it completely - didn't work.
LukeZ
LukeZOP6mo ago
can you check it by any chance if you can also only install an old version? this project
npm
djs-command-deployer
A simple, easy to use module that houses a Discord Client class that has two additional functions that can create, update and delete global and guild specific commands for your Discord App.. Latest version: 0.6.1, last published: 3 minutes ago. Start using djs-command-deployer in your project by running npm i djs-command-deployer. There are no...
LukeZ
LukeZOP6mo ago
okay, I think I fixed it by using the version parameter upon installing
Unknown User
Unknown User6mo ago
Message Not Public
Sign In & Join Server To View
d.js docs
d.js docs6mo ago
:guide: Creating Your Bot: Registering slash commands read more
LukeZ
LukeZOP6mo ago
no. Since I'm checking if a command needs to be updated/created/deleted and it's easier to do than the guide states it. I know
Unknown User
Unknown User6mo ago
Message Not Public
Sign In & Join Server To View
LukeZ
LukeZOP6mo ago
it's mainly for personal use but whoever wants to use it - they can do it or don't.
Unknown User
Unknown User6mo ago
Message Not Public
Sign In & Join Server To View
LukeZ
LukeZOP6mo ago
if someone doesn't want to use it - fine, I'm okay with that. I know
Want results from more Discord servers?
Add your server