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

Focus mode + Role management #290

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft

Focus mode + Role management #290

wants to merge 7 commits into from

Conversation

zuuring
Copy link
Member

@zuuring zuuring commented Feb 8, 2024

Notes

This adds a focus-mode controller to Valkyrie which allows discord users to set their roles to focus, which will temporarily hide specific discord channels until the focus mode is disabled. In addition, it also adds role-management component to easily be able to remove/add roles based on a discord userID and roleID.

Screenshots

Screenshot 2024-02-08 at 14 25 04 Screenshot 2024-02-08 at 14 24 58

To-do

  • setup initial focus-mode.ts controller that spawns message event in channel
  • Setup role management to change roles based on button events
  • Set .env to specify channel IDs for non-thesis discord servers.
  • tweak user flow accordingly.

This starts the work in setting up a focus mode interaction in Valkyrie.
This sets correct button states whether focus mode is enabled / disabled.
WIP - Just changing message events for testing on test-valkyrie instance.
- Resolve issues from lint
This commit adds a basic role manager linked to test-valkyrie instance for now, to easily assign focus roles on and off based on button interactions.
@zuuring zuuring changed the title Focus mode Focus mode + Role management Feb 8, 2024
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a naming note—if we want a subdir, we should have role-management/index.ts, think about the subdirectory as a “module”, and what index.ts exports should be the external-facing (i.e. for any other directory including parents) API of the directory. No one else should import role-management/*, they should just import role-management or role-management/index.ts (Those two should be synonyms.)

Change `role-management.ts` to `index.ts`
This commit fixes the issue on runtime, so now the focusmode message is sent as soon as the `discordClient` can confirm there is a channel named `verify`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants