strinking / futaba

Discord bot for the Programming server
MIT License
27 stars 13 forks source link

"Slow mode" based on mute role #23

Open emmiegit opened 5 years ago

emmiegit commented 5 years ago

Adds the ability to limit conversation flow in a channel based on a given number of messages/time interval. Don't delete excess messages, people find that very annoying. Instead apply the configured mute role, so it allows them to continue to see the chat, just not talk until the wait time ends.

Ma-wa-re commented 5 years ago

One way we could do this now is with the new slowmode option in the Text Channel options, it has a maximum of 120 (which I assume is seconds the documents do not mention this) and can be disabled with a value of 0

emmiegit commented 5 years ago

The discord slow mode is very unfortunate, since while it blocks messages at the API level, which is ideal, it has very coarse-grained precision. The fastest enabled setting is 1 message/sec, which is too slow for channels like #off-topic, and doesn't reflect the reality of "burst" messaging. 1 message/120 sec is clearly ridiculous.

That being said, I think it could be possible to use this setting if the slow mode is set to exactly one of those ratios. (E.g. 1/1). Otherwise, we have the bot measure message rate and apply the mute role.

On Sat, Oct 13, 2018, 2:58 PM Jake Richardson notifications@github.com wrote:

One way we could do this now is with the new slowmode option in the Text Channel options https://discordpy.readthedocs.io/en/rewrite/api.html#discord.TextChannel.edit, it has a maximum of 120 (which I assume is seconds the documents do not mention this) and can be disabled with a value of 0

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/strinking/futaba/issues/23#issuecomment-429566669, or mute the thread https://github.com/notifications/unsubscribe-auth/AIcClkJ2MnxWFLmMvKL3jg_g7SENcuEkks5ukje-gaJpZM4WXLWn .