-
-
Notifications
You must be signed in to change notification settings - Fork 751
!hush command #661
Copy link
Copy link
Closed
Labels
a: moderationRelated to community moderation functionality: (moderation, defcon, verification)Related to community moderation functionality: (moderation, defcon, verification)p: 2 - normalNormal PriorityNormal Prioritys: WIPWork In ProgressWork In Progresst: featureNew feature or requestNew feature or request
Metadata
Metadata
Assignees
Labels
a: moderationRelated to community moderation functionality: (moderation, defcon, verification)Related to community moderation functionality: (moderation, defcon, verification)p: 2 - normalNormal PriorityNormal Prioritys: WIPWork In ProgressWork In Progresst: featureNew feature or requestNew feature or request
Type
Fields
Give feedbackNo fields configured for issues without a type.
Occasionally, two users will be too busy fighting each other to notice a moderator trying to step in and clean up the situation. In these cases, we want to be able to silence the channel for a few minutes while we sort out what's going on and what we're going to do about it.
Enter:
!hush. This command will remove the ability for anyone except staff to post messages in that channel for a short duration, 10 minutes by default.This will not need any work on the
site, so it should be quite approachable.Since this is a moderator command, you should write unit tests for it.
Implementation details:
!hushshould remove posting permissions for non-staff in the channel it is called in for 10 minutes.!silence!hush <duration>should set a custom duration. This duration can either be specified as5M,5mor just5. It should not be possible to exceed 15 minutes in duration.!shhshould be added. This alias should be handled by the CommandNotFound handler (the way we do tags aliasing today). That's because we want to be able to support a dynamic amount ofh's behind thesh. For eachh, increase the duration by 2 minutes. For example,!shhwould cause a 4 minute hush,!shhhwould cause a 6 minute hush,!shhhhwould cause an 8 minute hush, and so on. The duration should never exceeed 15 minutes, no matter how many h's you add. The minimum number ofh's should be 2.!unhush, should undo the hush immediately. This is important in case the bot restarts in the middle of the duration, since we're not persisting the duration anywhere.!unsilencealias, and an!unshhhwith any number of h's.