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

Create voice kick command #2

Closed
ScoreUnder opened this issue Dec 4, 2019 · 7 comments
Closed

Create voice kick command #2

ScoreUnder opened this issue Dec 4, 2019 · 7 comments
Assignees
Projects

Comments

@ScoreUnder
Copy link
Owner

ScoreUnder commented Dec 4, 2019

&voicekick: kick a user from voice chat (calling a vote if necessary).

If the voice chat is a private channel (or public-but-temporary channel - see #1), and the owner runs this command, it should work no questions asked. Otherwise, it should call a vote with the existing users in the voice chat.

If there is a guild AFK channel specified, this command must not work in it.

If there are some users in the voice channel who are eligible to vote but who cannot see the channel with the votekick in it, then the command must fail.

If the person is kicked, they also get a permission override on the channel denying them connection privileges. This override is removed after 10 minutes have elapsed.

How the vote works:

  • To vote you must satisfy these criteria:
    • Be in the voice channel right now
    • Have been in the voice channel when the vote was started
    • Have been un-deafened when the vote was started
    • Not be the user that is targeted by the command
  • If the channel owner votes, their decision is final and overriding.
  • The vote ends when the owner votes, or when a majority of eligible users have voted one way or the other, or when it times out (described later).
  • The person who called the votekick automatically has a single "kick" vote in their name against the person they are trying to get kicked, so they don't need to vote.
  • You can vote "abstain", "kick" or "stay", and the user is kicked if "kick" gets the majority of non-abstain votes and the poll did not time out. A vote of "abstain" excludes you from the tally entirely.
  • The vote ends after 3 minutes without kicking the user if the votes for "kick" did not exceed the halfway threshold.

When the vote starts, everybody eligible to vote is pinged.

@ScoreUnder
Copy link
Owner Author

Tentative idea: allow this feature to be disabled on a per-server basis?

@ScoreUnder ScoreUnder added this to To do in Canti todo via automation Dec 4, 2019
@Brod8362
Copy link
Contributor

Brod8362 commented Dec 4, 2019

Maybe allow the feature to be usable on non-temp channels as well (configurable on a per-server basis, as described previously)
An optional parameter as to why they're being kicked could be a good idea.
Will the kicker user be alerted when they're kicked, and why?

@ScoreUnder
Copy link
Owner Author

Maybe allow the feature to be usable on non-temp channels as well (configurable on a per-server basis, as described previously)

Agreed with the first part, though I wonder if per-server config for something this fine-grained is something anyone is going to use. I have a feeling a blanket on/off switch would get more use, though that use may indeed be zero if previous stats are anything to go by.

An optional parameter as to why they're being kicked could be a good idea.

Seems like it couldn't hurt. I feel like they'd already know if they're eligible to vote anyway, and it would just be repeating what the user says in the next message, so the person calling the vote might as well just type it out in a normal message.

So I'm kind of torn on this one, since it's pretty simple but also I don't know if it will end up being useful.

Will the kicker user be alerted when they're kicked, and why?

They will be pinged when the vote is called (Voting to kick @user or something), but no notification will be given when they're actually kicked. Presumably they will realise because they will have been disconnected from the channel.

@ScoreUnder
Copy link
Owner Author

ScoreUnder commented Dec 4, 2019

A couple of "obvious" things that might need writing down:

  • Cannot kick a user who is not in the same voice channel when the command is used
  • If the user escapes the channel during the vote (presumably to avoid the kick), the vote continues because the temporary barring from the channel is still useful.

@Brod8362
Copy link
Contributor

Brod8362 commented Dec 4, 2019

  • If admins call the vote kick, will it immediately kick? I see reasons it could be either way:
    • On one hand, the admin is making the administrative decision to immediately kick the user. However, this is already available from discord with the "Disconnect" option. It may still be useful to mobile users as having a force voice kick available is useful. (Plus, mobile versions of discord often lack the newest features, requiring the need to "forward port" features like this.)
    • On the other hand, the admin is trying to act like a normal user and poll people if they want to kick the user normally. This is the option I lean towards, because they have the alternative option of using "Disconnect" as mentioned previously.
    • Could there be an optional command flag that allows you to pick between forcibly kicking and vote kicking? (-f, -v)

And, in this context, what defines an admin? Is it a user with Permission.VOICE_MOVE_OTHERS? Is it a custom defined role? Can an admin kick if they aren't in the voice channel?

I think I agree now with the notifying - it's likely they're being kicked for a reason and they'll probably already know what it is.

This is an edge case but - all users eligible to be pinged are going to be pinged. What if there's so many users that the message length exceeds 2000 characters? (This would need 62 people with 32 character long nicknames at minimum, not accounting for overhead with the rest of the message. This number is very high, but could theoretically happen. Probably not worth considering though.)

@ScoreUnder ScoreUnder moved this from To do to In progress in Canti todo Dec 17, 2019
@ScoreUnder ScoreUnder self-assigned this Dec 17, 2019
@ScoreUnder
Copy link
Owner Author

ScoreUnder commented Jan 8, 2020

So I've half-done this (kinda). TODO:

  • User must stay in the voice channel to cast a vote
  • Reactions on the kick vote are deleted when it ends
  • Owner's decision is overriding
  • Vote timeout
  • Persistence
    • of unban timer
    • of in-progress votes? (much less important)
  • votekick message probably needs some tweaking so that it's more obvious when it's no longer accepting new votes.

@ScoreUnder
Copy link
Owner Author

Going to split out the persistence of in-progress votes into another issue, because this feature is currently "Good Enough".

Canti todo automation moved this from In progress to Done Jan 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Canti todo
  
Done
Development

No branches or pull requests

2 participants