New error magically appeared xD

About to 40 minutes ago my bot crashed with a very uncommon error. Then tried to restart it and now it keeps crashing with same error. No changes in code were made, so my first thought is that discord updated something in his API. Here is the error code
C:\Users\Leona\Desktop\dashboard_bot\node_modules\discord.js\src\client\actions\InteractionCreate.js:50
if (channel && !channel.isTextBased()) return;
^

TypeError: channel.isTextBased is not a function
at InteractionCreateAction.handle (C:\Users\Leona\Desktop\dashboard_bot\node_modules\discord.js\src\client\actions\InteractionCreate.js:50:33)
at Object.module.exports [as INTERACTION_CREATE] (C:\Users\Leona\Desktop\dashboard_bot\node_modules\discord.js\src\client\websocket\handlers\INTERACTION_CREATE.js:4:36)
C:\Users\Leona\Desktop\dashboard_bot\node_modules\discord.js\src\client\actions\InteractionCreate.js:50
if (channel && !channel.isTextBased()) return;
^

TypeError: channel.isTextBased is not a function
at InteractionCreateAction.handle (C:\Users\Leona\Desktop\dashboard_bot\node_modules\discord.js\src\client\actions\InteractionCreate.js:50:33)
at Object.module.exports [as INTERACTION_CREATE] (C:\Users\Leona\Desktop\dashboard_bot\node_modules\discord.js\src\client\websocket\handlers\INTERACTION_CREATE.js:4:36)
Anyone knows what could happened? The error is inside the node modules
31 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Lixeiro Charmoso
Lixeiro CharmosoOP2y ago
[email protected] node v16.15.0
Syjalo
Syjalo2y ago
<#769862166131245066>
Lixeiro Charmoso
Lixeiro CharmosoOP2y ago
Lol My bad Also, there is a doc about how to update the modules? Just run the npm install discord.js?
Idris
Idris2y ago
@ileast bruh npm i discord.js@latest
Lixeiro Charmoso
Lixeiro CharmosoOP2y ago
Thanks
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Idris
Idris2y ago
what error?
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Lixeiro Charmoso
Lixeiro CharmosoOP2y ago
By reading the error looks like you must run this rmdir 'C:\Users\Administrator\Desktop\ticket bot\BotFiles\node_modules\discord.js\src' Not sure
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Lixeiro Charmoso
Lixeiro CharmosoOP2y ago
Indeed it says it cannot be deleted because its not empty "ENOTEMPTY: directory not empty", maybe you should manually delete it?
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Lixeiro Charmoso
Lixeiro CharmosoOP2y ago
The discord.js folder that is located inside your node_modules
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Lixeiro Charmoso
Lixeiro CharmosoOP2y ago
Yes Its just a guess, i have no idea if i'm talking shit
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Lixeiro Charmoso
Lixeiro CharmosoOP2y ago
My guess is delete then reinstall the discord js by the command they sent
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
monbrey
monbrey2y ago
nobody send to run npm fund did we...
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
monbrey
monbrey2y ago
Thats not an error
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
monbrey
monbrey2y ago
Okay so you were previously on v13 You should update to the latest v13, not v14
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
monbrey
monbrey2y ago
Yes, exactly it is, so do the same thing as the OP and update To latest v14 in your case
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Syjalo
Syjalo2y ago
It's just npm i discord.js@latest
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
edocsil
edocsil2y ago
The last two messages in #announcements are that it was fixed in latest v13 and latest v14 respectively
monbrey
monbrey2y ago
And in <#769862166131245066>
Want results from more Discord servers?
Add your server