Skip to content

Introduce command to control slowmode #1019

@kwzrd

Description

@kwzrd

Context
High profile channels such as #python-general have slowmode enabled to make chat traffic manageable. The amount of delay is adjusted based on current traffic in the channel.

Problem
The Discord GUI only allows @Admins to choose from a limited amount of options.

image

The API, however, allows much more granular control, taking ints in the range [0, 21600]. As such, we often use int eval to set custom values, commonly 2 seconds during low traffic times.

Proposal
The proposal is to introduce a bot command which will take a channel and a delay, and forward them to the API.

The advantages include:

  • Convenience: we no longer need to int eval custom values
  • The command can be made available to mods, which otherwise do not have access to the channel control panel

The implementation should be fairly trivial. Command signature takes a text channel (a d.py convertor makes this convenient), and an int delay. The delay is checked to ensure it fits into the correct range, with an informative message returned otherwise. If the delay is valid, it is passed to the TextChannel.edit method (linked above).

Metadata

Metadata

Assignees

Labels

a: moderationRelated to community moderation functionality: (moderation, defcon, verification)a: utilityRelated to utility commands: (bot, eval, extensions, jams, reminders, snekbox, utils)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