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

Invite management from Valkyrie #295

Open
zuuring opened this issue Mar 6, 2024 · 1 comment
Open

Invite management from Valkyrie #295

zuuring opened this issue Mar 6, 2024 · 1 comment
Assignees

Comments

@zuuring
Copy link
Member

zuuring commented Mar 6, 2024

Introduction

At the moment it would be beneficial to have an invite functionality that would give the ability to manage / create / remove invites from Valkyrie. In order to have Valkyrie run invites, there should be the introduction of a invite-management.ts helper which will have the ability to:

  • Create new invites based on set criteria (maxAge, maxUses, inviter, inviterID, expiresAt, createdAt, channelId) via discordJS/invite:Class
  • Remove invites after certain criteria, such as expiry date, uses, channel being deleted etc.
  • Send notifications to channels based on invites being made, roles they are assigned to, when the expire etc.

Implementation

The first implementation of this would be to create a new invite for defense channels based on a set of criteria such as:

  • If a new channel is created or renamed with an ext-*-audit name, we create an associated role named * (i.e., we run s/ext-(.*)-audit/$1/ in sed terms).
  • That role is given “view channel” privileges automatically on the channel.
  • Valkyrie also creates a server invite for the channel, posts a message with that invite, and pins that message in the channel.
  • Valkyrie monitors new users in ⁠No Access and the invite counts for the invite. If a new user joins from an invite associated with a Defense channel, they automatically get the Thesis Guest role and the role for that channel.

Once this task has run via Valkyrie, it should also log these events to the specific channel in discord with information like:

  • When the invite link is generated
  • When the invite link has been used
  • When the invite link has expired / been deleted.
@zuuring zuuring self-assigned this Mar 6, 2024
@zuuring
Copy link
Member Author

zuuring commented Mar 8, 2024

Further notes on implementation:

  • Wire up to role-mapping, so that on channel creation, we check permissions but also for ext-*-audit channels, create a new role matching channel name format.

  • Tie a specific user joining event to invite ID -> which assigns audit channel role. This will require checking member join url id, matching it to invite id and then matching channel name to role.

  • Delete channel + role when channel is removed.

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

1 participant