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

Exclude other bot users from the pool #26

Open
mjmammoth opened this issue Apr 11, 2023 · 0 comments
Open

Exclude other bot users from the pool #26

mjmammoth opened this issue Apr 11, 2023 · 0 comments
Labels
bug Something isn't working
Milestone

Comments

@mjmammoth
Copy link
Owner

Currently, the random member from the channel chosen can be another slack bot which is undesirable.

When MusicalChair is added to a channel, it should scan for bot users using the users_info method of the slack_bolt sdk and add those bot users to the permanent exclusions state. This would also require for new members added to the channel to be acted upon, checking if it is a bot or not.

This should help achieve the desired outcome:

non_bot_members = [member for member in members if not client.users_info(user=member)["user"]["is_bot"]]
@mjmammoth mjmammoth added this to the App usability milestone Apr 11, 2023
@mjmammoth mjmammoth added the bug Something isn't working label Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Development

No branches or pull requests

1 participant