Added slowmode statistic for python-general#1374
Conversation
| log.info(f'{ctx.author} set the slowmode delay for #{channel} to {humanized_delay}.') | ||
|
|
||
| await channel.edit(slowmode_delay=slowmode_delay) | ||
| if channel.id == Channels.python_general: |
There was a problem hiding this comment.
Why are we tracking only one channel? I think having multiple samples would be worth it, like we often have #ot0 in slowmode.
There was a problem hiding this comment.
Maybe we should track all channels?
There was a problem hiding this comment.
That was the plan, but channels can change names (especially ot), while having it by id would be pretty annoying, and we don't really need other channels for what this is intended for, so I agreed with @jb3 to limit it to just pygen.
There was a problem hiding this comment.
I don't know how it looks on the moderation front for slowmode, but maybe discordpy would also be nice here. Dynamic tracking doesn't sound too good for channels that get a sm set rarely
There was a problem hiding this comment.
We could have a mapping of usually slowmode-ed channel IDs to human readable name, and use that before submitting the stats.
There was a problem hiding this comment.
I guess I could add dpy and ot0 in case it's needed in the future. It's not super important to me though.
| log.info(f'{ctx.author} set the slowmode delay for #{channel} to {humanized_delay}.') | ||
|
|
||
| await channel.edit(slowmode_delay=slowmode_delay) | ||
| if channel.id == Channels.python_general: |
There was a problem hiding this comment.
Instead of restricting it to just python general and manually adding it in future for other channels, why not create a list like !otn, and the moderators can add channels to the list and remove it.
There was a problem hiding this comment.
This would make this unnecessary complex. But I still think discord.py channel should be added at least.
Added a statistic for advanced monitoring of the cooldown in python-general. Also made the slowmode reset command use the slowmode setting command under the hood to avoid repetition.