Skip to content

!hush command #661

@lemonsaurus

Description

@lemonsaurus

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:

  • !hush should remove posting permissions for non-staff in the channel it is called in for 10 minutes.
  • Add the alias !silence
  • !hush <duration> should set a custom duration. This duration can either be specified as 5M, 5m or just 5. It should not be possible to exceed 15 minutes in duration.
  • A special alias !shh should 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 of h's behind the sh. For each h, increase the duration by 2 minutes. For example, !shh would cause a 4 minute hush, !shhh would cause a 6 minute hush, !shhhh would 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 of h's should be 2.
  • A second command, !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.
  • The unhush should also have an !unsilence alias, and an !unshhh with any number of h's.
  • Both commands should have unit tests.

Metadata

Metadata

Assignees

Labels

a: moderationRelated to community moderation functionality: (moderation, defcon, verification)p: 2 - normalNormal Prioritys: WIPWork In Progresst: featureNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions