TypeError: channel.isTextBased is not a function

I have a problem with Interactions: Since yesterday evening every button interaction results in an error as follows
/home/developer/Wishbot/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/developer/Wishbot/node_modules/discord.js/src/client/actions/InteractionCreate.js:50:33)
at module.exports [as INTERACTION_CREATE] (/home/developer/Wishbot/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36)
at WebSocketManager.handlePacket (/home/developer/Wishbot/node_modules/discord.js/src/client/websocket/WebSocketManager.js:352:31)
at WebSocketShard.onPacket (/home/developer/Wishbot/node_modules/discord.js/src/client/websocket/WebSocketShard.js:489:22)
at WebSocketShard.onMessage (/home/developer/Wishbot/node_modules/discord.js/src/client/websocket/WebSocketShard.js:328:10)
at callListener (/home/developer/Wishbot/node_modules/ws/lib/event-target.js:290:14)
at WebSocket.onMessage (/home/developer/Wishbot/node_modules/ws/lib/event-target.js:209:9)
at WebSocket.emit (node:events:512:28)
at Receiver.receiverOnMessage (/home/developer/Wishbot/node_modules/ws/lib/websocket.js:1180:20)
at Receiver.emit (node:events:512:28)
/home/developer/Wishbot/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/developer/Wishbot/node_modules/discord.js/src/client/actions/InteractionCreate.js:50:33)
at module.exports [as INTERACTION_CREATE] (/home/developer/Wishbot/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36)
at WebSocketManager.handlePacket (/home/developer/Wishbot/node_modules/discord.js/src/client/websocket/WebSocketManager.js:352:31)
at WebSocketShard.onPacket (/home/developer/Wishbot/node_modules/discord.js/src/client/websocket/WebSocketShard.js:489:22)
at WebSocketShard.onMessage (/home/developer/Wishbot/node_modules/discord.js/src/client/websocket/WebSocketShard.js:328:10)
at callListener (/home/developer/Wishbot/node_modules/ws/lib/event-target.js:290:14)
at WebSocket.onMessage (/home/developer/Wishbot/node_modules/ws/lib/event-target.js:209:9)
at WebSocket.emit (node:events:512:28)
at Receiver.receiverOnMessage (/home/developer/Wishbot/node_modules/ws/lib/websocket.js:1180:20)
at Receiver.emit (node:events:512:28)
Solution:
I have a problem with Interactions: Since yesterday evening every button interaction results in an error as follows ```js /home/developer/Wishbot/node_modules/discord.js/src/client/actions/InteractionCreate.js:50 if (channel && !channel.isTextBased()) return;...
Jump to solution
2 Replies
kyra
kyra2y ago
Not a Sapphire issue + update discord.js to 13.14.0 or 14.8.0
Himori
HimoriOP2y ago
ehm yeah I should have thought of that myself thank you
Want results from more Discord servers?
Add your server