Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FR: Add discord role to member with specific event ticket #18

Closed
VibroAxe opened this issue Jan 2, 2024 · 4 comments
Closed

FR: Add discord role to member with specific event ticket #18

VibroAxe opened this issue Jan 2, 2024 · 4 comments

Comments

@VibroAxe
Copy link

VibroAxe commented Jan 2, 2024

Automatically link a discord server & role to an event, then for each user with a valid (or transferred ticket) automatically grant them that role.

Bonus points> Allow the role to be ticket type specific (EG: BYOC gets one role, indoor sleeping another)

@mintopia
Copy link
Owner

mintopia commented Jan 2, 2024

AIUI, I don't think this is something we can do from the oauth2 flow we're using for authentication. The better option is a discord bot that has appropriate permissions on the server, and it can then manage the groups for people.

Would be appropriate work for anyone with skills at writing Discord bots.

@VibroAxe
Copy link
Author

VibroAxe commented Jan 2, 2024

Was hoping it would be easy enough to hook into the existing work to just add a different discord integration to push the role change :(

Looks possible but i've not fully read yet> https://gist.github.com/RikoDEV/e6a35ce7cb7fb9880537c0b6e19b35db

@mintopia
Copy link
Owner

mintopia commented Jan 2, 2024

Interesting, didn't know about that.

Notes for self:

@mintopia
Copy link
Owner

mintopia commented Jan 2, 2024

Turns out role connections is the wrong way to do it. It's easier to just connect the app to the server as a bot and then use the API to manage roles on members.

  • You need to enable the app as a bot
  • Add the bot key to the config in Control
  • Ensure it has the Server Members intent

You will now have an option in Settings to Connect to Discord Server. Once done, you will be able to allocate a role to a ticket type.

Anytime a ticket type's discord role is changed, or a ticket is created/user changed - roles will be updated. They will also be updated every 15 minutes.

Control will only update roles for users that it knows about. If the user isn't in Control's DB, the roles will not be modified. Control WILL remove roles from users it knows about if that user no-longer has a ticket with that role assigned to it.

@mintopia mintopia closed this as completed Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants