slowmode
Make bot manage slowmode in a channel
Available options:
add
Add channel for bot to manage slowmode in
Available options:
channel
Required
Channel where to bot should manage slowmode
min_slowmode
Minimal (shortest) possible slowmode on a channel in seconds. Defaults to 0
max_slowmode
Required
Maximum (longest) possible slowmode on a channel in seconds
message_rate
Required
Amount of messages per minute for bot to aim for
update_interval
How often to check message rate and update slowmode. Defaults to 1h
Available choices:
1min
5min
10min
15min
30min
1h
5h
10h
24h
delete
Stop bot from managing slowmode in a channel
Available options:
channel
Required
Channel where to stop bot from managing slowmode
show
Show configured channels managed by the bot
This command allows bot to manage slowmode in a channel to retain constant `rate` of sent messages.
It works by recalculating slowmode in a channel every `update_interval` minutes. Messages `rate` is calculated from past `update_interval` minutes (up to 10 minutes). After that messages are summed up and divided by minutes count (`msgs_count / minutes`).
Then slowmode adjustement (in seconds) is calculated by using formula: `ln(mr / tr) * (max_sm - min_sm)`
Where:
- `mr` -> Message `rate` per minute in a channel
- `tr` -> Target message `rate` per minute in a channel
- `max_sm` -> Max allowed slowmode for a bot to set in a channel
- `min_sm` -> Min allowed slowmode for a bot to set in a channel
And the new slowmode is current slowmode + that adjustment. Final value is of course clipped to minimum/maximum given in the command.