Please someone help me fixing this


how do i fix it please guys it’s an error on all of my repls and i already updated my discordjs using
npm install discord.js

Welcome to the community Sphinxius! We aren’t able to help you without the Repl link. How are we able to see your code, without knowing where it is?

3 Likes

https://replit.com/@sdfdjfhlglxvsdklfnsddxcvxcv/Welcomer

sorry here is the link

1 Like

Whenever the code stop it stops on all of my repls and it shows the error :

const existing = channel.messages.cache.get(data.id);

Can I please have some more detail?

Like what sir ? i will explait whan i start the code suddenly all of my repls got the same error and they kinda crash and i had that for several times the same message appear on all of them and i don’t know how to solve it

i got the same error

This looks like a Discord.js error… Though I’m not really an expert at Discord bots.

2 Likes

Is channel.messages undefined?

2 Likes

you can check the code i don’t think so

It must be, because channel.messages.cache is a property of channel.messages, and it’s saying that channel.messages.cache is a property of an undefined variable.

3 Likes

so how am i supposed to fix that ?

try replacing

const existing = channel.messages.cache.get(data.id);

with this line of code

const existing = channel.messages.fetch(data.id);
1 Like