Reputation: 61
I try to put message.guild.channels.some
in my Discord.JS V12
bot but its not working. Does somebody know to what this code changed to? I tried to research on Google but nothing ever made my problem to solve.
Thank you PLAMSMA chicken
. You fixed my problem.
The solution is:
message.guild.channels.cache.some
Upvotes: 0
Views: 1180
Reputation: 2785
[v12] Methods accessing cached data are now found on the cache
- guild.roles.get("id")
+ guild.roles.cache.get("id")
- message.guild.channels.some
+ message.guild.channels.cache.some
This is the case for any structure relying on cached data, the most likely affected parts of your code are the Collection methods and properties (.size, .has(), .get(), .filter(), .map(), .find(), .forEach(), .reduce(), .sort(), .some())
Read more about here: https://discordjs.guide/additional-info/changes-in-v12.html#managers-cache
Upvotes: 1