Skip to content

Releases: monashcoding/karma-bot

v0.4.1

06 Apr 10:24
afa3d33

Choose a tag to compare

Increased Karma Limits

Bumped rate limits to allow more karma giving/taking per interval:

  • Global limit: 100 → 500 karma per 6-hour window
  • Per-user limit: 5 → 20 karma per 6-hour window

Both positive and negative limits were increased symmetrically.

Full Changelog: v0.4.0...v0.4.1

v0.4.0

05 Apr 05:09
d0cc451

Choose a tag to compare

v0.4.0 — Karma Stats

New Features

  • /stats — view karma stats for yourself or any member
    • Total karma given and received (all time)
    • Top 5 users you've given the most karma to
    • Top 5 users who've given you the most karma
    • Displayed as a rich embed with avatar thumbnail
    • Optional member parameter to view someone else's stats

v0.3.3

04 Apr 11:39
34e88c7

Choose a tag to compare

v0.3.3 — Grouped Mentions

New Features

  • Grouped mentions@alice @bob @charlie +++ gives karma to all three in one message
  • Grouped mentions bypass the global rate limit (same as team role karma) but still respect per-user limits
  • Mixing users and team roles in one group works: @alice @TeamRole @bob +++

Improvements

  • Unified batch processing for both team role mentions and grouped user mentions
  • 74 total tests passing

v0.3.2

04 Apr 02:40
8fa3b71

Choose a tag to compare

v0.3.2

Fixes

  • Mixed em dash + hyphen combos@user —- now correctly counts as 3 (em dash=2 + hyphen=1), not 2
  • Regex rewritten to match any mix of hyphens and em dashes as one group
  • Added _count_minus() helper for accurate counting

Tests

  • 70 total tests passing
  • New tests for mixed dash combos (—-, -—, --—), _count_minus helper, and edge cases

v0.3.1

04 Apr 02:20
66eeafc

Choose a tag to compare

v0.3.1

New Features

  • Em dash support@user — counts as -2 karma per em dash (handles mobile autocorrect)

Docs

  • Fully updated README covering all features, commands, config, setup, and architecture

v0.3.0

04 Apr 02:10
d0286b0

Choose a tag to compare

v0.3.0 — Karma Decrement & Expanded Tests

New Features

  • Karma decrement@user --- removes karma (2+ minus signs), with configurable min limits
  • Separate +/- rate limitsLIMIT_MAX_KARMA_SEND / LIMIT_MIN_KARMA_SEND for global, LIMIT_MAX_KARMA_USER_SEND / LIMIT_MIN_KARMA_USER_SEND for per-user
  • Renamed config constants — all rate limit constants now use LIMIT_ prefix for clarity

Tests

  • Karma pattern — 10 tests for ++/-- regex matching (users, roles, mixed, edge cases)
  • Per-user rate limits — 7 tests for per-user queries, negative karma tracking
  • Team role DB — 6 tests for sync, aggregation, multi-team, guild scoping
  • 59 total tests passing

v0.2.1

03 Apr 18:34
355956a

Choose a tag to compare

v0.2.1 — Per-User Rate Limits & Team Role Karma

New Features

  • Per-user rate limitMAX_KARMA_USER_SEND caps how much karma one person can give to the same user per interval
  • Team role karma@TeamRole +++ gives karma to ALL members of that role, bypasses global limit
  • Self-karma via team roles — allowed when you're part of the mentioned team
  • Autocomplete period selector/leaderboard and /team-leaderboard show a dropdown of available periods with data (up to 25)
  • Renamed /teams-leaderboard/team-leaderboard

Feedback Improvements

  • Users are told why karma was reduced: per-user cap, global budget, or rate limited
  • Team role karma is summarized: "Gave +15 karma across the team!"
  • If all team members are maxed: "All members in that team have been maxed out on karma by you."
  • Per-user rate limit shows reset time or Jono emoji (50/50)

v0.2.0

03 Apr 17:36
b69aea1

Choose a tag to compare

v0.2.0 — Team Leaderboards

New Features

  • Team roles — configure team roles via /config add-team-role, remove-team-role, view-team-roles
  • Team leaderboard/team-leaderboard command aggregates karma by team
  • User team role cacheuser_team_role DB table caches which team each user is in, synced on every interaction
  • Auto team leaderboard — posted after individual leaderboard on window rollover

How It Works

  • Team roles are Discord roles designated as "teams" (e.g., Frontend, Backend)
  • Users' team memberships are synced to the DB whenever they give/receive karma or use commands
  • Team karma is the sum of individual karma for all members with that team role
  • A user can be in multiple teams — their karma counts for each

v0.1.0

03 Apr 18:32
6ac3946

Choose a tag to compare

v0.1.0 — Initial Release

Core Features

  • Karma system — mention a user with @user ++ to give karma, tracked in PostgreSQL
  • Rate limiting — configurable max karma per interval with Discord timestamp feedback
  • Role-based access — only members with configured karma roles can give/receive karma
  • Leaderboard/leaderboard command with paginated embeds and medal emojis
  • Karma windows — semiannual (or configurable via dateutil.rrule) karma periods
  • Auto leaderboard — posts leaderboard to a configured channel when a window rolls over

Guild Configuration

  • /config set-leaderboard-channel — set where leaderboards are posted
  • /config add-karma-role / remove-karma-role / view-karma-roles — manage who can use karma
  • Per-guild config stored in PostgreSQL with in-memory stale-while-revalidate cache

Infrastructure

  • Async DB layer with SQLModel + asyncpg
  • Generic BaseDB[T] with typed CRUD, per-table classes (UserDB, KarmaWindowDB, etc.)
  • cached() wrapper for stale-while-revalidate caching on any table
  • Persistent paginator buttons that survive bot restarts
  • Docker + Docker Compose for dev and prod
  • GitHub Actions CI (ruff lint + pytest) and release workflow (multi-arch Docker image to GHCR)
  • Custom emoji config via discord.PartialEmoji