Discord help : whenever i do a react to a message i got this

Whenever i add a react to dmclan i got this error * Exception: TypeError: channel.isText is not a function :*


Repl link:

code snippet

Hello @TrapXenno and welcome to the forums!

Could you please provide the link to your repl?

Also, the react message that you are trying to make is to A user interact with a menu by reacting among some options?

1 Like

here is the link replit linkimage

I’m having a hard time looking for the origin of the error through your files.

In which file are you calling channel.isText ?

1 Like

Try to find where you set that channel.isText.

As of the recent version of Discord, channel#isText(), channel#isVoice(), channel#isDM(), etc. are not available any more. You should use the ChannelType enums instead.

If you want to check if a channel is a TextChannel, you can use the following:

const { ChannelType, Client } = require('discord.js');
// ..
if (message.channel.type === ChannelType.GuildText)

To view more about their documentation: ChannelType | API | discord-api-types documentation

1 Like

where do i change that on the index.js ?

this one #modules/handlers/clan.js when i put the dmclan command i got the error

There’s a place in your code which you define that channel.isText you have to find where you set this and change.

I did not see that in your index.js, are you sure that you are getting this error for this same code you post in replit?

it is where i mention you i can’t post link sir it’s on the clan.js
/kskskzizuuzjzm#modules/handlers/clan.js

You Can Try 13.15.1 Version Of Discord.js

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.