API Feature Request: Allow passing channel to "Add Guild Member" #3212
Replies: 16 comments
-
Just so my 😕 reaction doesn't go unexplained... why not use instant invites at that point, at least for this use case? While I don't think being able to pass a channel to Add Guild Member will be a bad idea (it's a good idea, at least in theory), I just don't understand why you can't use invites for that use case. |
Beta Was this translation helpful? Give feedback.
-
Because Add Guild Member itself has an entirely different use case. It allows you to very finely control who you let into a Discord server and when, because with the added OAuth2 step involved you can inspect the discord users account before adding them, possibly cross-referencing them with a 3rd party site (i.e. forum membership or subscriptions) Instant invites are entirely public links (vs secure OAuth2) and you have no chance for an intermediate screening. |
Beta Was this translation helpful? Give feedback.
-
Okay... and why not just use a bot on that guild for that purpose? Also, we're talking about a website that advertises discord guilds. I don't see why it would absolutely need an app authorized for any reason other than as a sign-up method. What cross-referencing is that sort of website going to do that a bot on a guild couldn't already do? |
Beta Was this translation helpful? Give feedback.
-
I'm confused by what you mean; Add Guild Member requires Consider, that I have a private Discord server for my Twitch followers. This allows you to securely add followers to your Discord servers:
What this issue about, is allowing to pass |
Beta Was this translation helpful? Give feedback.
-
Invites are not reliable, from a server-list perspective. If you allow users to specify their own invite link you run into at least 2 main issues:
If you move to a system where the bot creates invite links, you run into other issues.
This is all very easily solved by asking the user for permission to add them to servers for them, and ensuring that the bot is given the The only downside to this is currently, you can't add a user to a specific channel, which is the purpose of this issue. Addendum: DiscordServers originally stored invites that the user could create on their own. This quickly ran into problems described above, and we spent most of our time guiding people how to set up their permissions correctly. |
Beta Was this translation helpful? Give feedback.
-
Just so I don't seem like I'm ignoring what's been said in response, @aequasi I think I understand what you're getting at now. Please excuse me for my misunderstanding in my original comments. I was making a wrong assumption about how Add Guild Member worked! |
Beta Was this translation helpful? Give feedback.
-
There's no current way to pass client state like what channel to show from the server to the client reliably. A member has no concept of a channel, but rather the server itself. Invites belong to channels, and members belong to servers. When your client joins an invite, it knows the channel to show you on join after syncing the server. Adding a member from the server has no requirement that a client be open when the endpoint is called, so offline clients would never receive state. We also do not persist states outside of open client sessions. Because of the complexity needed to solve for such a small use case it's unlikely we would build a feature like this. The best you can really do if you want to use this OAuth2 flow is to redirect the user to the correct guild after the flow: In general invite links work much better for this use case (public server lists). You can easily script a bot which creates and caches invites for a guild, only replacing them if they expire or are removed. Handling edge cases like "What happens if the server is at the limit of invites that can be generated." or "What happens if the bot doesn't have permission" is just part of interfacing with any API where access control and limitations exist, and similar conditions exist even for your current integration (like what happens if a user revokes your app). |
Beta Was this translation helpful? Give feedback.
-
A simple link that I could redirect to, that would redirect the client for them, if the client is open, would be plenty for me.
I'm not sure I agree with this, and in my use case, I definitely disagree. I don't have the time to field support questions and teach users how to use discord properly. Support wise, its a lot easier to tell people they have to have From a purely "easy of use" standpoint, invite links do not "work much better". From a technical standpoint, its also less friendly, as I have to have a script running constantly, (which hits your API too), that is checking for expired/invalid/dead invite links. This is not ideal. |
Beta Was this translation helpful? Give feedback.
-
It's not exactly something you need a script running constantly for:
Also, maybe it's me, but the permission problem you describe sounds like the exception, not the rule... |
Beta Was this translation helpful? Give feedback.
-
Its extra avenues of failure that I don't want to entertain.
It may be an exception, but it happens enough. Doesn't discount the need for a better solution to avoid having to support, especially when the path to fixing the problem is more complicated than just using "Add Guild Member" |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Only need to add it on the initial bot oauth page. To be able to create an invite you have to make sure that:
That permission, even if the bot has it server wide, can be negated in that channel. This is common, as lots of server owners deny create invite perms to @everyone in all channels. With A lot easier. |
Beta Was this translation helpful? Give feedback.
-
just replace &permissions=1 with &permissions=8 (or 9) and that wouldn't be a problem :) |
Beta Was this translation helpful? Give feedback.
-
Not going to ask for Admin perms. Way more permission than the bot needs. |
Beta Was this translation helpful? Give feedback.
-
Ik this is dead, but I would say that an option on the RPC api to point the user to that channel on the guild would be the best. The add members endpoint does it silently and nothing happens to the client except for the extra guild on the guild list. It’s probably more work for discord to make a gateway event that’s specifically for that purpose. Maybe a one time use token that’s granted when the member is added. The token could be used with a rpc endpoint that lets you point to the newly added guild and specify an channel? |
Beta Was this translation helpful? Give feedback.
-
Any update on this? Is this possible now? |
Beta Was this translation helpful? Give feedback.
-
Use Case: DiscordServers.com uses the Add Guild Member endpoint to add users to the server they want to join. Server owners would really appreciate the ability to specify what channel people see when they join the server, without updating the order of channels.
Edit:
Another acceptable solution would be an RPC url to redirect any open client to the given channel, assuming the user is in the server and can see the channel.
Beta Was this translation helpful? Give feedback.
All reactions