message.guild.roles.find is not a function

Viewed 24031

EDITED FOR SELF ANSWER

message.guild.roles.find is not a function Is a result of using a DJS v11 method on DJS v12, in other words message.guild.roles.find is outdated and should be replaced with

message.guild.roles.cache.find

DJS v11 is now discontinued. Follow this guide to update your code for v12 Here

1 Answers

Yes, you now have to use message.guild.roles.cache.find, since v12 uses Managers. You can read the documentation to find the other changes by yourself ^^

Related