Its
Its
DIAdiscord.js - Imagine an app
Created by Its on 3/5/2024 in #djs-questions
Error DiscordAPIError[50001]: Missing Access
Code:
async updateInvites(guild: Guild) {
const vanity = await guild.fetchVanityData()
if(vanity?.code) {
this.invites.set(vanity.code, vanity.uses)
}

(await guild.invites.fetch()).map((invite) => {
this.invites.set(invite.code, invite.uses)
})
}
async updateInvites(guild: Guild) {
const vanity = await guild.fetchVanityData()
if(vanity?.code) {
this.invites.set(vanity.code, vanity.uses)
}

(await guild.invites.fetch()).map((invite) => {
this.invites.set(invite.code, invite.uses)
})
}
Error: DiscordAPIError[50001]: Missing Access at handleErrors (/root/Projects/Fate/Main/node_modules/@discordjs/rest/dist/index.js:722:13) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async SequentialHandler.runRequest (/root/Projects/Fate/Main/node_modules/@discordjs/rest/dist/index.js:1120:23) at async SequentialHandler.queueRequest (/root/Projects/Fate/Main/node_modules/@discordjs/rest/dist/index.js:953:14) at async _REST.request (/root/Projects/Fate/Main/node_modules/@discordjs/rest/dist/index.js:1266:22) at async Guild.fetchVanityData (/root/Projects/Fate/Main/node_modules/discord.js/src/structures/Guild.js:657:18) at async InviteManager.updateInvites (/root/Projects/Fate/Main/dist/struct/managers/InviteManaget.js:64:24) at async /root/Projects/Fate/Main/dist/app/Economy/Events/Ready.js:15:5
13 replies