So I have been utterly frustrated these past few days because I have not been able to find a single resource online which properly documents how to find emojis when writing a di
Please check out the switching to v12 discord.js guide
v12 introduces the concept of managers, you will no longer be able to directly use collection methods such as
Collection#get
on data structures likeClient#users
. You will now have to directly ask for cache on a manager before trying to use collection methods. Any method that is called directly on a manager will call the API, such asGuildMemberManager#fetch
andMessageManager#delete
.
In this specific situation, you need to add the cache object to your expression:
var bean = message.guild.emojis.cache?.find(emoji => emoji.name == 'bean');