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:
@@ -25,7 +25,8 @@ func NewLotteryPlugin(client *mautrix.Client, euro *EuroPlugin) *LotteryPlugin {
|
||||
}
|
||||
}
|
||||
|
||||
func (p *LotteryPlugin) Name() string { return "lottery" }
|
||||
func (p *LotteryPlugin) Name() string { return "lottery" }
|
||||
func (p *LotteryPlugin) Version() string { return "1.1.0" }
|
||||
|
||||
func (p *LotteryPlugin) Commands() []CommandDef {
|
||||
return []CommandDef{
|
||||
@@ -198,11 +199,9 @@ func (p *LotteryPlugin) handleLotteryOdds(ctx MessageContext) error {
|
||||
| Match | Prize | Odds (approx.) |
|
||||
|-------|-------|----------------|
|
||||
| 5 of 5 | Jackpot (split among winners) | 1 in 142,506 |
|
||||
| 4 of 5 | €1,000 (fixed) | 1 in 3,062 |
|
||||
| 3 of 5 | €100 (fixed) | 1 in 141 |
|
||||
| 2 of 5 | €10 (fixed) | 1 in 16 |
|
||||
| 1 of 5 | €2 (fixed) | 1 in 4 |
|
||||
| 0 of 5 | Nothing | — |
|
||||
| 4 of 5 | €5,000 (fixed) | 1 in 3,062 |
|
||||
| 3 of 5 | €500 (fixed) | 1 in 141 |
|
||||
| 2 of 5 | €25 (fixed) | 1 in 16 |
|
||||
|
||||
Tickets: €1 each. Max 100 per week. 5 numbers from 1–30.
|
||||
Minimum €500 pot required for jackpot payout.`
|
||||
@@ -228,8 +227,8 @@ func (p *LotteryPlugin) handleLotteryHistory(ctx MessageContext) error {
|
||||
if h.RolledOver > 0 {
|
||||
sb.WriteString(fmt.Sprintf(" | Rolled over: €%d", h.RolledOver))
|
||||
}
|
||||
sb.WriteString(fmt.Sprintf("\n 4-match: %d | 3-match: %d | 2-match: %d | 1-match: %d\n\n",
|
||||
h.Match4Winners, h.Match3Winners, h.Match2Winners, h.Match1Winners))
|
||||
sb.WriteString(fmt.Sprintf("\n 4-match: %d | 3-match: %d | 2-match: %d\n\n",
|
||||
h.Match4Winners, h.Match3Winners, h.Match2Winners))
|
||||
}
|
||||
|
||||
return p.SendReply(ctx.RoomID, ctx.EventID, sb.String())
|
||||
|
||||
Reference in New Issue
Block a user