Company
Date Published
Author
Bob Belderbos
Word count
732
Language
English
Hacker News points
None

Summary

Karma Bot is a custom Slack bot created as a personal learning project that enhances Slack interactions by allowing users to easily give or deduct karma points from each other using specific commands. Developed using Slack’s Real Time Messaging API, the bot processes karma changes by parsing messages with regex to identify actions, converting user IDs to usernames, and updating karma scores, which are stored using Python's Counter object and serialized with pickle for persistence. The bot is designed to remain operational even after crashes by using a run.sh wrapper to respawn it, and although initially built as a monolithic script, it was later refactored into modular components for better organization, with plans to open-source the project in the future.