feat(bots): anonConfess + shitpostLeaderboard built-in bots

- ConfessBot: polls for /confess messages, deletes original, reposts anonymous
- LeaderboardBot: daily top-10 message count recap from DB
- BotFunc extended with *sql.DB param for DB-reading bots
- Both types registered in runner + BotManager UI
This commit is contained in:
2026-07-15 19:46:09 -04:00
parent f215f000b8
commit 53530ce6dd
6 changed files with 183 additions and 4 deletions
+2 -1
View File
@@ -2,6 +2,7 @@ package bot
import (
"context"
"database/sql"
"encoding/json"
"fmt"
"io"
@@ -16,7 +17,7 @@ type SteamFreeConfig struct {
}
// SteamFreeBot polls Steam's featured categories for 100%-off games.
func SteamFreeBot(ctx context.Context, raw json.RawMessage, send SendMessageFunc) {
func SteamFreeBot(ctx context.Context, _ *sql.DB, raw json.RawMessage, send SendMessageFunc) {
var cfg SteamFreeConfig
if err := json.Unmarshal(raw, &cfg); err != nil || cfg.ChannelID == "" {
return