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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user