Here's the relevant snippet of the code I was working on:
message.client.guilds.fetch('ID Here', false).then(guild => message.channel.send(guild.name))
According do the discord.js docs, this function, GuildManager#fetch(), should theoretically work. However, I keep getting this error:
message.client.guilds.fetch is not a function
I even tried directly copying and pasting the example from the function docs, but it still gave me the same error.
I'm fairly stumped, any help would be appreciated!
Edit: I should mention that all other discord.js fetch methods are working fine, such as:
message.channel.messages.fetch()
Edit #2: My previous problem has been solved, I was using the wrong version of discord.js. However, I now get a new error:
DiscordAPIError: Missing Access
When running it.
