mirror of
https://github.com/prosolis/gogobee.git
synced 2026-07-15 08:32:41 +00:00
Add version system, tax tracking, lottery winner DMs, fmtEuro, audit fixes
- Version system: per-plugin versions via Versioned interface, crash_log and version_history DB tables, !version command, crash stats in !botinfo - Tax tracking: tax_ledger table, trackTaxPaid across all communityTax and communityPotAdd sites, tax paid display in !stats and !superstatsexplusalpha - Lottery: DM winners with winning ticket details and matched numbers bolded - fmtEuro: generic currency formatter with thousand separators across all economy display paths - Audit fixes: streak_decayed column for Streak Survivor achievement, combat_narrative empty-phase guard, crafting success rate integer division, RecordCrash nil-DB guard Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
7
main.go
7
main.go
@@ -15,6 +15,7 @@ import (
|
||||
"gogobee/internal/dreamclient"
|
||||
"gogobee/internal/plugin"
|
||||
"gogobee/internal/util"
|
||||
"gogobee/internal/version"
|
||||
|
||||
"github.com/joho/godotenv"
|
||||
"github.com/robfig/cron/v3"
|
||||
@@ -35,7 +36,7 @@ func main() {
|
||||
logLevel = "info"
|
||||
}
|
||||
util.InitLogger(logLevel)
|
||||
slog.Info("logger initialized", "level", logLevel,
|
||||
slog.Info(version.Full(), "level", logLevel,
|
||||
"ollama_host", os.Getenv("OLLAMA_HOST"),
|
||||
"ollama_model", os.Getenv("OLLAMA_MODEL"))
|
||||
|
||||
@@ -52,6 +53,7 @@ func main() {
|
||||
if err := db.SeedSchedulerDefaults(db.Get()); err != nil {
|
||||
slog.Warn("seed scheduler defaults failed", "err", err)
|
||||
}
|
||||
db.RecordStartup(version.Version, version.Commit)
|
||||
|
||||
// Create Matrix client
|
||||
cfg := bot.Config{
|
||||
@@ -207,6 +209,7 @@ func main() {
|
||||
defer func() {
|
||||
if rec := recover(); rec != nil {
|
||||
slog.Error("member event handler panic", "panic", rec, "room", evt.RoomID)
|
||||
db.RecordCrash(version.Short(), "member_handler", fmt.Sprintf("%v", rec))
|
||||
}
|
||||
}()
|
||||
|
||||
@@ -239,6 +242,7 @@ func main() {
|
||||
if rec := recover(); rec != nil {
|
||||
slog.Error("message event handler panic", "panic", rec,
|
||||
"sender", evt.Sender, "room", evt.RoomID)
|
||||
db.RecordCrash(version.Short(), "message_handler", fmt.Sprintf("%v", rec))
|
||||
}
|
||||
}()
|
||||
|
||||
@@ -283,6 +287,7 @@ func main() {
|
||||
if rec := recover(); rec != nil {
|
||||
slog.Error("reaction event handler panic", "panic", rec,
|
||||
"sender", evt.Sender, "room", evt.RoomID)
|
||||
db.RecordCrash(version.Short(), "reaction_handler", fmt.Sprintf("%v", rec))
|
||||
}
|
||||
}()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user