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

feat: voicekick command #225

Merged
merged 3 commits into from
Oct 13, 2022
Merged

feat: voicekick command #225

merged 3 commits into from
Oct 13, 2022

Conversation

gregdan3
Copy link
Contributor

The original intention was to entirely remove a user from voice, but that isn't possible with discordrb; see shardlab/discordrb#185

This version moves the user to a specified channel if one is set, to the afk channel if one is set, or throws a failure message otherwise.

Copy link
Collaborator

@anna328p anna328p left a comment

Choose a reason for hiding this comment

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

Looks great overall! However, probably need to add a permission check of some kind

@anna328p
Copy link
Collaborator

really appreciate the en_kawaii translations lol

modules/util.rb Outdated
usage: '.voicekick [user] [channel]',
min_args: 1,
max_args: 2,
required_permissions: %i[manage_users]
Copy link
Collaborator

Choose a reason for hiding this comment

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

unfortunately, discordrb only supports setting one, global string for this feature, which means localization does not work.

so permission checks usually happen manually (example).

@gregdan3
Copy link
Contributor Author

gregdan3 commented Oct 12, 2022

Looks great overall! However, probably need to add a permission check of some kind

How's move_members? Exactly the permission we're looking for.

Looks like just adding the param does the job, bot behaved as intended immediately.

@anna328p
Copy link
Collaborator

the issue is that the message it responds with doesn't get localized because of CommandBot jank

@gregdan3
Copy link
Contributor Author

yup- I see it now
tested and pushed

@anna328p
Copy link
Collaborator

the other issue is that qbot ignores commands from other bots. which will be more difficult to resolve

@gregdan3
Copy link
Contributor Author

ooo yikes
Where is that logic implemented? We could throw in a bot ID whitelist for the config

@anna328p
Copy link
Collaborator

ignore_bots: true,

@anna328p anna328p merged commit 4bd4692 into arch-community:main Oct 13, 2022
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