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

Automatically assign "Yes Theory" role #200

Open
mvarendorff opened this issue Feb 7, 2021 · 0 comments
Open

Automatically assign "Yes Theory" role #200

mvarendorff opened this issue Feb 7, 2021 · 0 comments
Labels
enhancement New feature or request needs arch input Needs input from the architects regarding specifics

Comments

@mvarendorff
Copy link
Member

When someone joins a voice chat with someone else, they are allowed the Yes Theory role. We can use a VoiceState listener to see if someone is eligible and automatically assign the role.

The likeliness of missing someone this way is extremely small (only affects people who joined a vc for the first time on the server less than one minute before a bot restart).

Idea

The plan is to evaluate the information from the newState passed into the VoiceState listener and gather information about other people in the same channel a user joined into. If the following criteria applies:

  • The user is not muted
  • At least one other non-muted member is in the same voice channel
  • At least one minute passes and the user is still in the same voice channel, unmuted with someone else also unmuted, they get the role

Questions to Arch

  • Is the criteria above sufficient?
  • What stuff could be done to fool the system?

Thoughts

  • I am not sure if it is worth the effort but it might make sense to keep a state of currently running timeouts in the bot and halt them on VoiceState changes that would make it invalid. For example someone could join a VC with someone, immediately leave for 59 seconds, join again and leave to get the badge. Whether that is a realistic thing to happen, idk,
@mvarendorff mvarendorff added the needs arch input Needs input from the architects regarding specifics label Feb 7, 2021
@mvarendorff mvarendorff added the enhancement New feature or request label Mar 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs arch input Needs input from the architects regarding specifics
Projects
None yet
Development

No branches or pull requests

1 participant