mirror of
https://github.com/prosolis/gogobee.git
synced 2026-07-16 00:52:40 +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:
@@ -49,7 +49,8 @@ func NewWordlePlugin(client *mautrix.Client, euro *EuroPlugin, dict *dreamclient
|
||||
}
|
||||
}
|
||||
|
||||
func (p *WordlePlugin) Name() string { return "wordle" }
|
||||
func (p *WordlePlugin) Name() string { return "wordle" }
|
||||
func (p *WordlePlugin) Version() string { return "2.0.0" }
|
||||
|
||||
func (p *WordlePlugin) Commands() []CommandDef {
|
||||
return []CommandDef{
|
||||
@@ -695,8 +696,9 @@ func (p *WordlePlugin) awardPrize(puzzle *WordlePuzzle) []WordlePayout {
|
||||
if c.solver {
|
||||
amount += solverBonus
|
||||
}
|
||||
p.euro.Credit(uid, float64(amount), "wordle_win")
|
||||
payouts = append(payouts, WordlePayout{UserID: uid, Name: c.name, Amount: amount, Solver: c.solver})
|
||||
net, _ := communityTax(uid, float64(amount), 0.05)
|
||||
p.euro.Credit(uid, net, "wordle_win")
|
||||
payouts = append(payouts, WordlePayout{UserID: uid, Name: c.name, Amount: int(net), Solver: c.solver})
|
||||
}
|
||||
return payouts
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user