Generate an invite link to add a user to a role.

Comments

123 comments

  • JKybett

    Surely, the logical way to do it permission-wise would be for people who have the invite permission to be able to make invites and people who also have manage roles be able apply any role assignments to the invite that they could apply themselves?

    1
  • Erudian

    Okay, that's a big "duh" on my part, but yeah. That sounds like a much better solution.

    0
  • Mario Aleo

    I really we can get this feature, this would help people to create Classroom and Workspace servers without having to assign roles user by user.

    We had an alternative that was the Invite-Role Bot(https://top.gg/bot/480240313525600267), unfortunately, about a month ago Discord has changed something in their API and this bot isn't working anymore, the bot maintainer has tried to reach Discord Dev Team to try to fix it, but, apparently, they didn't reply.

    So I hope the Discord Dev Team creates this feature since there isn't any alternative to solve this kind of necessity.

    0
  • Erudian

    There are a couple of options to help ease the pain of not having this feature, although none of them are "ideal":

    The Dyno Bot (https://dyno.gg/) allows you to auto-assign a role to anyone that joins your server. The limitation there is that everyone that joins gets whatever role(s) you choose. You can't assign different roles to different individuals (at least, not as far as I've been able to tell)

    Dyno Bot does have several additional moderation features that may be useful as well, including automated and timed messages with different options.

    Using Zira (https://zira.gg/), you can create a reaction role message that allows users to assign certain roles to themselves. The limitation with this is that, while you can have unlimited (AFAIK) reaction messages in whatever channels you need, there are things like "toggle" roles - a user can only have one of the role options at a time - that are limited by the free version. It also takes a little more effort to get this set up properly, but it is probably one of the better free options out there.

    Zira also has an auto-role feature that can assign a role to every user that joins (like Dyno Bot), so it could be a replacement if you don't need the additional moderation features.

    While neither of these bots do exactly what we're looking for with this suggestion, they may be able to provide at least some help to server admins while we wait for the Discord Dev Team to implement the role-based invite feature here.

    -1
  • JKybett

    I've had to do a similar thing in my servers using premium MEE6 bot. The issue is, it can't be trusted for roles that come with important permissions or reveal sensitive channels.
    For example, some of my servers have roles for people I could easily mass-email a link to, but these roles give access to hidden channels and allowing people to self assign the role that gives access to these channels is too risky. So, I have to manually assign the role to users.

    0
  • Mario Aleo

    Dyno Bot and Zira don't do what Nelly and most people here asked for, this request is not about to assign role "X" when users join the server, it is about to invite URL "X" assign role "X" to the user, invite URL "Y" assign role "Y" to the user.
    For example, I'm creating a classroom server, where we have a "Teacher" role, "Student" role and each subject has its own role. With the feature requested in this thread, we could generate a link that will assign the user to the roles "Teacher" and "Math" or a link that will assign the role "Student".
    A simple auto-assign can't do this, because it can only give a specific role to everyone that enters the server, and the reaction auto-sign wouldn't work either because "Student" shouldn't be able to give themself a "Teacher" role or put themselves in a subject that they're not part of.

    PS: Invite-Role Bot (https://top.gg/bot/480240313525600267) was able to do this, when it was working :(

    0
  • JKybett

    Agree completely. I'm not saying (and I don't think Erudian is either) that these bots give this feature, they're just the best workaround we've managed to find so far. They won't be for everyone because we desperately need and invite-role feature.

    0
  • JKybett

    I actually run some servers in an academic context, and might have a workaround for your specific scenario if you're interested?
    Drop me a message on Discord if you're interested: JKybett#5446

    0
  • Billy — ICF & Interchain GmbH

    JKybett just sent you a friend request. I'd love to know about your workaround and if it's something we might be able to leverage as well!

    0
  • MikeyRB

    The fact that this has been debated for over two years without a solid solution is all the convincing anybody should need. I came on specifically to find out how to do this and found this thread. I can *probably* do what I want by adding another bot but that does seem like a silly way to perform a simple task.

    3
  • Lodane

    i want this feature, i'm subbed to this topic... and, boy, it'd be really great if discord could do this so chuds that think a bot could do this (it can't) would stop posting about bots that can't do this. the emails of "hey try this bot that doesn't do it" are really underwhelming.

    2
  • 𝐉𝐞𝐧𝐧𝐚

    The "Invite-Role Bot" is working again!!!!!!!!

    https://top.gg/bot/480240313525600267

    0
  • starling

    This is still a highly requested feature. I would love to see this implemented in the near future as discord continues growing.

    1
  • Billy — ICF & Interchain GmbH

    Just installed with the link that Jenna provided but it still doesn't work for me. I get an error that it can't assign a role even though i applied the proper perms to the bot:

    ```

    Invite-Role Bot
    Error!
    I'm not able to assign this role to users!
    Uh oh!
    ```
    1
  • Joel.Shaver

    It worked for me today, but only for roles created after I invited the bot.

    -1
  • 𝐉𝐞𝐧𝐧𝐚

    Billy, the roles that you want the bot to assign need to be below the bot in the role hirarchy. Just put the Invite Role Bot at the top of the role list in the settings. Also check if the bot has the permission to assign roles. (If in doubt, try making it admin.)


    Joel, if you got it to work with roles that you've created after you've invited the bot... -> new roles will automatically be added at the bottom of the list - so below the bot. That's why those work. :-)

    -1
  • Billy — ICF & Interchain GmbH

    Amazing that fixed it thank you Jenna!!!

    -1
  • Joel.Shaver

    Jenna, that make sense. But I wasn't able to get it to work with existing low-permission roles even when the bot was admin... That was what confused me.

    0
  • Erudian

    Well, while I certainly don't like having to give the bot Administrator permissions for a variety of reasons, I was successfully able to get the Invite-Role Bot to connect a specific invite to the specific roles I wanted assigned. I tried just assigning it just the two roles it mentions at the top of the ~help command output - Manage Server and Manage Roles - but, obviously, that's not enough to actually connect the invite to a role.

    Still, I'd obviously prefer to avoid giving Administrator permissions to a bot, if for no other reason than limiting its visibility and availability to certain channels on the server. As it stands, if I want to use the bot for the stated purpose (of this thread, at least), it's going to show up in every channel on the server and potentially be available for any/every user to send it commands.

    I've not tested this, but is it possible that someone could use the bot to assign themselves higher-level permissions than the actual server administrator wants them to have? i.e., if they know the commands (and the prefix used on the server) and have the Create Invite permission, could they create their own invite and tell the bot to link it to a higher-level role, then use that invite themselves and potentially give themselves access to things they shouldn't have? Since the bot is what's actually creating the link using Administrator permissions, I could certainly see this as a possibility.

    While I appreciate the work that's gone into this bot, and it seems like a decent "workaround" for the time being, IMO, this functionality is something that would be much better - and more appropriately - handled as an integrated feature of Discord itself as in the mock-up Phantom posted two years ago.

    0
  • Billy — ICF & Interchain GmbH

    OK so I got the bot working but it is limited to 25 invitations. This isn't going to work for me, and I guess giving an external bot *Administrator* privs is probably not a great idea.

    sooooo I built one myself! Take a look at https://github.com/okwme/discord-invite-role-bot. It's very minimal at the moment, I just built it in a few hours so I welcome any additions other coders may feel like contributing!

    now if i could just figure out how to get rid of the default cards that show up when you paste a discord invite link. I have ~50 invites in a single message and the stack of cards underneath it is awful.

    -1
  • Wayland

    Billy — ICF & Interchain GmbH

    To suppress link embeds in discord messages surround it with <> in the message e.x. <https://discord.gg/XXXXXXXX> and the link will still be clickable with no "card" appearing, but your solution of using a code block should work too.

    Still the functionality relies on invite usage counts which provide no concreate reference between a new guild member and the invite they used to join, only an inference based on the counter ticking which the bot has to fetch each time. In a small guild where there is low traffic this will probably work fine even with sensitive roles, but as soon as there is potential for more than one join to happen in the time that fetch takes to resolve the invite counters the solution will fail to assign roles properly and could pose a security risk.

    No matter your guild size though, if more than one member joins while the bot is offline (assuming the invite counters are saved) there is no way to figure out who used what invite once back online. The unfortunate users would then require manual role assignment.

    If you need something that will provide invite based role assignment right now then perhaps setting up a bot with the above limitations is right for you, but really it is the Discord Devs that will need to come through with something purpose built for the task either some more API fields with relevant info or a full fledged feature in the client. I hope these band-aid solutions bouncing around in this thread don't let them think it is okay to be resting on their laurels.

    1
  • Billy — ICF & Interchain GmbH

    wow Wayland great tip thank you! and yes you're right this technique shouldn't be trusted with very high frequency or high security roles. I'm just using it for roles that allow you to see specific channels, but anyone can choose to have these roles. Rather than force users to pick which channels, this link allows them to join with at least that first role/channel. If it fails they'll see an error but still be able to view the welcome channel that guides them through the original process. 

    0
  • natemaingard

    Pleeeeease, Discord Devs, add this feature. It would simplify so much, and it seems like a no-brainer. 

    Like right now I just want a super simple way to automate inviting people who contribute to my virtual tip jar to a specific role. It should be the most basic thing ever right!?

    Anyways, just re-adding my plea here. Please do this for us 🙏

    3
  • KEBABBBsas

    how to i get it to work?

    -2
  • mistr88

    Pls don't do this. Rather add feature to API to get what invite was used by some specific member (so it will be more bug proof than the system that is using invite use count). When there are kinda big discord server (100 members+) that haven't even disabled the @everyone ping for members (and some of them even have rule as "Don't ping @everyone"), there would be tons of servers where the default role will be given by invite instead of bot. OK, that sounds as exactly the use-case for this feature, but problem then is what to do, when the invite will be created by some member without manage roles permission.

    0
  • Sebastian Nielsen

    mistr88 Here is how its supposed to work:

    If someone without the manage roles permission creates a invite, he will never see the "Role selection" box, and that particular invite will be role-less.

    To create a invite with a role assignment, you would need both the "Create invite" permission AND "Manage role" permission. And you can only check roles that are lower than you (ergo, roles that you could assign to a user manually).

    Invites will never have a "default role" or similiar. Default for a invite is like default for a user connecting.

    1
  • mistr88

    I probably didn't write it well, but my point was, that there are noob admins even on big servers, so instead of configuring bot for giving the member role to new members, they would probably just set it as role to be granted via the invite. But when some non-admin would generate invite themself, it would not give the role for members, that joined via this link, so it would make lots of confusion on some servers IMO.

    0
  • Sebastian Nielsen

    mistr88 I don't think Discord should account for noob admins. If they don't know how to administrate a discord server propely, they shouldn't have one.

    1
  • Pantsed_Dude

    Seriously, 2 years later and a clear use case with a countless number of people wanting this and it still hasn't been implemented? Seems like a no brainer. Kinda dumbfounding.

    1
  • 1

Please sign in to leave a comment.