Please describe the problem you are having in as much detail as possible:
So, after npm installing discordjs/discord.js, on using guilds.find(), it throws a TypeError: fn.bind is not a function.
(additional log output)
at Map.find (\sora-5\node_modules\discord.js\src\util\Collection.js:171:49)
(could be related to dependencies)
Include a reproducible code sample here, if possible:
this.client.guilds.find('name', 'guildName');
Further details:
Priority this issue should have – please be realistic and elaborate if possible: low-med
[ ] I found this issue while running code on a __user account__
If you look at the documentation, you'll see that this format is not supported in the development version of discord.js https://discord.js.org/#/docs/main/master/class/Collection?scrollTo=find
Instead, use
this.client.guilds.find(guild => guild.name === 'guildName');
ty! :)
@appellation May I ask why that format is no longer supported?
@FireController1847 There was a PR with its discussion here.
To sum it up (as the description of the PR notes), it was due to the method not adding any new functionality, since the same can be accomplished with the callback parameter. It is a similar case for the other methods and parameters that were revoked.
var roless = message.guild.roles.cache.find('name', role);
whats problem? i used var role =
Most helpful comment
If you look at the documentation, you'll see that this format is not supported in the development version of discord.js https://discord.js.org/#/docs/main/master/class/Collection?scrollTo=find