When social communities grow past a certain point (Dunbar’s Number?), they start to suck. Be they sororities or IRC channels, there’s a point where they get big enough that nobody knows everybody anymore. The community becomes overwhelmed with noise from various small cliques and floods of obnoxious people and the signal-to-noise ratio eventually drops to near-zero — no signal, just noise. This has happened to every channel I’ve been on that started small and slowly got big. - xkcd, 2008
- Every message in the monitored channel is normalized (lowercased, punctuation removed)
- If the message has been said before, it's deleted and the user is warned
- Repeat offenders get exponentially increasing mute times (2s → 8s → 32s → infinity and beyond)
- Mute times decay by half every 6 hours
In theory, this should make it so that the channel stays clean and only the most creative and interesting messages are left. If it works in IRC, it should work in Slack too.
- Only one channel is monitored (spin up more instances for more channels, this helps bypass rate limits too)
- All messages are normalized (eg. "hello!" and "Hello?" are the same)
- Stupid fast SQLite with Bun
- Decaying mutes for uncreative people:
2 * 4^(violations-1) - Small
- Only bottleneck being the sluggish Slack API
- Make a Slack app and:
- Turn on Socket Mode
- Make a app token with
connections:write - Add these bot scopes:
channels:history,channels:read,chat:write,im:write - Subscribe to
message.channelsevent
- Copy
.env.exampleto.envand fill it out - Run
bun start - Invite the bot to your channel
- Profit???
Do note that since this bot leverages the admin API to silence nerds, you need an admin token to run it. Otherwise it will just yell at you and do nothing.