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.
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.tshelper which will have the ability to:maxAge, maxUses, inviter, inviterID, expiresAt, createdAt, channelId) via discordJS/invite:ClassImplementation
The first implementation of this would be to create a new invite for
defensechannels based on a set of criteria such as:ext-*-auditname, we create an associated role named * (i.e., we runs/ext-(.*)-audit/$1/in sed terms).Once this task has run via Valkyrie, it should also log these events to the specific channel in discord with information like: