Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: channel.isTextBased is not a function #198

Open
NCCoder2 opened this issue Sep 10, 2023 · 1 comment
Open

TypeError: channel.isTextBased is not a function #198

NCCoder2 opened this issue Sep 10, 2023 · 1 comment

Comments

@NCCoder2
Copy link

/home/runner/Discord-Bot-v14/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 (/home/runner/Discord-Bot-v14/node_modules/discord.js/src/client/actions/InteractionCreate.js:50:33)
at Object.module.exports [as INTERACTION_CREATE] (/home/runner/Discord-Bot-v14/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36)
at WebSocketManager.handlePacket (/home/runner/Discord-Bot-v14/node_modules/discord.js/src/client/websocket/WebSocketManager.js:352:31)
at WebSocketShard.onPacket (/home/runner/Discord-Bot-v14/node_modules/discord.js/src/client/websocket/WebSocketShard.js:489:22)
at WebSocketShard.onMessage (/home/runner/Discord-Bot-v14/node_modules/discord.js/src/client/websocket/WebSocketShard.js:328:10)
at callListener (/home/runner/Discord-Bot-v14/node_modules/ws/lib/event-target.js:290:14)
at WebSocket.onMessage (/home/runner/Discord-Bot-v14/node_modules/ws/lib/event-target.js:209:9)
at WebSocket.emit (node:events:527:28)
at Receiver.receiverOnMessage (/home/runner/Discord-Bot-v14/node_modules/ws/lib/websocket.js:1178:20)
at Receiver.emit (node:events:527:28)

@LaN1437
Copy link

LaN1437 commented Sep 11, 2023

Do: npm i discord.js@latest
In shell if you are using replit, if visual studio code do it in terminal and if in a custom host do it in console

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants