From 06589984e0f991f2a4f8a4059e6c4e29e3d77550 Mon Sep 17 00:00:00 2001 From: AK Date: Sun, 2 Aug 2026 21:58:21 -0700 Subject: [PATCH] feat: add up emoji to karma boosts --- docs/plugins.md | 2 +- plugins/karma.go | 2 +- plugins/karma_test.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/plugins.md b/docs/plugins.md index 90e7b5d..8d0fd4f 100644 --- a/docs/plugins.md +++ b/docs/plugins.md @@ -795,7 +795,7 @@ project-- - karma tracks case-insensitive thing++ and thing-- changes. - thing++ and thing-- also work as standalone ordinary chat messages. GoBot confirms each update in one compact line, such as - `Karma boost! thing +1 (total +2)`; command messages are not treated as + `🆙 Karma boost! thing +1 (total +2)`; command messages are not treated as karma changes. - Positive karma milestones at +10, +25, +50, and +100 add a highlighted trophy notice when the total crosses the threshold. diff --git a/plugins/karma.go b/plugins/karma.go index c6cbbed..c2a3be6 100644 --- a/plugins/karma.go +++ b/plugins/karma.go @@ -109,7 +109,7 @@ func formatKarmaUpdates(updates []karmaUpdate) string { } message := "" if positive { - message = ircColor(ircGreen, "Karma boost! "+strings.Join(details, ", ")+" ✨ 🎯 🌟 💫") + message = ircColor(ircGreen, "🆙 Karma boost! "+strings.Join(details, ", ")+" ✨ 🎯 🌟 💫") } else if negative { message = ircColor(ircRed, "Karma dip! "+strings.Join(details, ", ")+" 📉 🌀 💥 😬") } else { diff --git a/plugins/karma_test.go b/plugins/karma_test.go index 00e5736..fab0e7a 100644 --- a/plugins/karma_test.go +++ b/plugins/karma_test.go @@ -29,7 +29,7 @@ func TestKarmaRegex(t *testing.T) { func TestKarmaUpdateMessageIsColorfulAndCompact(t *testing.T) { message := formatKarmaUpdates([]karmaUpdate{{key: "echo", delta: 1, value: 4}}) - if !strings.Contains(message, "Karma boost! echo") { + if !strings.Contains(message, "🆙 Karma boost! echo") { t.Fatalf("unexpected karma message: %q", message) } if !strings.Contains(message, "✨ 🎯 🌟 💫") {