luni3359 / koa-bot

Discord bot
MIT License
3 stars 0 forks source link

Fix behavior of the channel media-only warnings #13

Open luni3359 opened 4 years ago

luni3359 commented 4 years ago

The current warning system serves the purpose of keeping media-based text channels from getting flooded with conversations that should go in different text channels (which are not entirely disallowed, but are discouraged).

How it currently behaves:

  1. Counter keeps track of how many messages have been sent in any given text channel.
    • The counter resets when a message is sent in a different text channel.
    • Sending urls resets the counter.
  2. If the counter surpasses the defined maximum, a warning is issued.

Current issues:

luni3359 commented 4 years ago

This feature will come with the (proper) introduction of a database. It will save the count of each text channel there, and the time when it was last sent.

"Small talk" growing into a full-blown conversation will make the bot ask to stop it. For example, people start sending messages to each other (somewhere around 25 in a short span) and it will trigger the bot. A greater limit will allow it to permit further messages as long as enough time has passed since the last message sent.

luni3359 commented 4 years ago

Starting from commit 8355c7773732887e1bb37936049bcff45425f024 warnings now reset with any kind of command issued.