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?
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
This looks like a Discord.js error… Though I’m not really an expert at Discord bots.
Is channel.messages
undefined?
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.
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);