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

Custom auto-tagging #303

Merged
merged 2 commits into from
Apr 11, 2024
Merged

Custom auto-tagging #303

merged 2 commits into from
Apr 11, 2024

Conversation

zuuring
Copy link
Member

@zuuring zuuring commented Apr 3, 2024

Notes

This adds the ability to modify the auto-tagging function of Valkyrie based off of a defined list of PRIVATE_CHANNELS. It also will match the tagging to the role specified, in order to have custom roles tagged for specific threads started in a channel.

Handling IDs

Alternatively, we can also modify this to work directly with channel / role IDs rather than names, but in testing it seems to be working as it should.

### Notes
This adds the ability to modify the auto-tagging function of Valkyrie based off of a defined list of `PRIVATE_CHANNELS`. It also will match the tagging to the role specified, in order to have custom roles tagged for specific threads started in a channel.

### Handling IDs
Alternatively, we can also modify this to work directly with channel / role IDs rather than names, but in testing it seems to be working as it should.
@zuuring zuuring marked this pull request as ready for review April 3, 2024 06:55
@zuuring zuuring requested a review from Shadowfiend April 3, 2024 06:57
This commit renames main channel const to `CUSTOM_CHANNEL_ROLE` and makes sure `matchingChannel` check runs before the rest.
@zuuring zuuring requested a review from Shadowfiend April 4, 2024 07:23
@zuuring
Copy link
Member Author

zuuring commented Apr 4, 2024

@Shadowfiend Did some changing around based on your feedback so this should be good now!

@@ -35,6 +38,21 @@ async function autoJoinThread(

const placeholder = await thread.send("<placeholder>")

// Use this to assign a specific role based on the mapping in CUSTOM_CHANNEL_ROLE, in order to map specific roles/channels
const matchingChannel = CUSTOM_CHANNEL_ROLE.find(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const matchingChannel = CUSTOM_CHANNEL_ROLE.find(
const matchingChannelOverride = CUSTOM_CHANNEL_ROLE.find(

Copy link
Contributor

@Shadowfiend Shadowfiend left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more note, but let's land this as-is.

@Shadowfiend Shadowfiend merged commit 527f288 into main Apr 11, 2024
7 checks passed
@Shadowfiend Shadowfiend deleted the custom-auto-tagging branch April 11, 2024 17:17
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

Successfully merging this pull request may close these issues.

2 participants