are the isCommand() is isText() etc, functions are going to get deprecated?
i recall seeing this somewhere, but either im going crazy and i can't find it anywhere.
29 Replies
Crazy?
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Post the full error stack trace, not just the top part!
- Show your code!
- Explain what exactly your issue is.
- Not a discord.js issue? Check out #useful-servers.
- Issue solved? Press the button!I was crazy once,
They locked me in a room,
a rubber room,
a rubber room with rats,
and rats make me crazy.
oof
they already are
its isTextBased() now
wait was it only for channels?
also for commands
and that version hasnt been released yet?
because on 14.11 it doesnt show up as being deprecated
The functions do not exist anymore
Type guards that just
thing.type === something
are deprecaed in v13 and removed in v14they still show up for me on vscode
and im pretty sure im on the latest version because i created a new project & installed d.js just now
run npm ls discord.js
i dont know what you're doing, but those functions do not exist
https://old.discordjs.dev/#/docs/discord.js/14.11.0/class/TextChannel
you can see it for yourself there
<Interaction>.isCommand()
is there because there're other guards that based on it, like <Interaction>.isChatInputCommand()
oh so some of them got removed?
you're comparing a type to a boolean
i know that
well then don tdo that
im trying to show that isCommand still exists
according to vscode
on BaseInteraction it exists yes
but that is unreliable as it also includes any context menu command
so, some of the is stuff got removed then?
ill just use the .type to check it
better to typeguard
.
brain.exe has stopped working
use the .isChatInputCommand etc typeguards instead of comparting the types
i dont get which of the two is removed since both show up for me
should be using the is stuff for everything?
the type is still valid but it isnt recognised by ts
ah i see, ill just use the is one then