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

Role set/create on channel creation #296

Open
zuuring opened this issue Mar 6, 2024 · 0 comments
Open

Role set/create on channel creation #296

zuuring opened this issue Mar 6, 2024 · 0 comments

Comments

@zuuring
Copy link
Member

zuuring commented Mar 6, 2024

Introduction

Currently we have two use cases we can already implement the role-management.ts with, that being the focus-mode and using the role manager to create new roles based on a new channel creation within a category, based on specific channel name nomenclature.

Implementation

In order to build this out, we create an additional function to check when discordClient.on("channelCreate") event is fired and match if the channel.name has the format ext-*-audit, then create a new role matching the new channel name format and assign role access to this channel.

This should also send message events to the newly created channel giving notification of the role creation and users with access to it.

If we run an additional checks, we can also monitor discordClient.on("channelDelete") events to remove the roles automatically when a channel is deleted.

Linking with Invites

We can also link this role creation event to the invite-management which generates a new invite based on channel / role criteria set in the above implementation example.

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