Track invite origin
Hello developers!
I am trying to set up a tracker for different invite sources for my bot but I keep getting a
Missing permissions
error.
The invite URL works fine for every use case.
What kind of permission do I need to be able to fetch commands.
Current intents: GatewayIntentBits.Guilds, GatewayIntentBits.GuildInvites
11 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!that endpoint requires the manage guild permission
not sure what you think you are doing here
discord doesn't have a source in the server invites
Thanks but wouldn't manage guild permission make people hesistant in adding the bot?
not sure what you expect me to say; that's the limitation the api enforces
if you want to fetch invites, that's what the app needs
This is the one you are referring to right?
I have custom URLs thsr contain source obviously wouldn't post without it
I tried adding the permission and re inviting the bot still didn't work
those will not be saved by discord
Oh
Well if get past the permission issue
I will worry about that later
the permission issue is that the bot does not have a role with the manage server permission on the server you are trying to fetch invites from
Makes sense i remember couple years ago roles were created automatically for bots that joined
I guess they changed that
the invite link can include permissions, if they do a role with those permissions is created, yes
that's not guaranteed, people can just invite your app with another invite link