mirror of
https://github.com/prosolis/gogobee.git
synced 2026-07-16 17:02:42 +00:00
Add !adv alias, hospital insurance billing, wordle/UNO earnings tracking, streak death protection
- Add !adv shorthand for !adventure commands and DM replies - Hospital bill now shows insurance deduction and amount due - Refactor hospital nudge from per-goroutine sleep to shared ticker - Dead players' streaks are frozen; grace period on revival day - Track wordle earnings in wordle_stats, show in !stats and superstats - Show UNO net earnings and trivia accuracy % in superstats - Disable sentiment/profanity emoji reactions (classification still logs) - Add URL_PREVIEW_IGNORE_USERS env var to skip bot users - Add DISABLE_WOTD_POST env var, remove unused wotd.Prefetch() - README updates for all of the above Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -114,7 +114,7 @@ var hospitalFrequentCustomer = hospitalBillItem{
|
||||
}
|
||||
|
||||
// generateItemizedBill builds a procedural hospital bill that sums to the given total.
|
||||
func generateItemizedBill(total int64, hospitalVisits int, isHoliday bool) string {
|
||||
func generateItemizedBill(total int64, afterInsurance int64, hospitalVisits int, isHoliday bool) string {
|
||||
// Shuffle and pick 8-12 items from the pool
|
||||
pool := make([]hospitalBillItem, len(hospitalBillPool))
|
||||
copy(pool, hospitalBillPool)
|
||||
@@ -218,6 +218,27 @@ func generateItemizedBill(total int64, hospitalVisits int, isHoliday bool) strin
|
||||
sb.WriteString(strings.Repeat(" ", padding))
|
||||
sb.WriteString(formatBillAmount(total))
|
||||
sb.WriteByte('\n')
|
||||
|
||||
insLabel := "Guild Adventurer's Insurance"
|
||||
insPadding := maxName - len(insLabel) + 2
|
||||
if insPadding < 2 {
|
||||
insPadding = 2
|
||||
}
|
||||
sb.WriteString(insLabel)
|
||||
sb.WriteString(strings.Repeat(" ", insPadding))
|
||||
sb.WriteString("-" + formatBillAmount(total-afterInsurance))
|
||||
sb.WriteByte('\n')
|
||||
|
||||
sb.WriteString("─────────────────────────────────\n")
|
||||
oweLabel := "AMOUNT DUE"
|
||||
owePadding := maxName - len(oweLabel) + 2
|
||||
if owePadding < 2 {
|
||||
owePadding = 2
|
||||
}
|
||||
sb.WriteString(oweLabel)
|
||||
sb.WriteString(strings.Repeat(" ", owePadding))
|
||||
sb.WriteString(formatBillAmount(afterInsurance))
|
||||
sb.WriteByte('\n')
|
||||
sb.WriteString("```")
|
||||
|
||||
return sb.String()
|
||||
|
||||
Reference in New Issue
Block a user