Skip to content

Commit 1ce3211

Browse files
committed
Add a prefix command to view saves in guild rn
1 parent 614d1f0 commit 1ce3211

3 files changed

Lines changed: 27 additions & 12 deletions

File tree

README.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -95,24 +95,23 @@ Complete daily challenges to earn powerful rewards! Inspired by popular quest sy
9595
**Features:**
9696
- **Daily Checklist**: Reset every 24 hours with fresh challenges
9797
- **Quest Tasks**:
98-
- Solve 5 Basic CodeBuddy Quizzes
99-
- Vote for the Bot on top.gg (coming soon!)
98+
- Answer 5 CodeBuddy quiz questions
99+
- Count 5 valid numbers in the counting channel
100100
- **Rewards**:
101-
- **Streak Freezes**: Automatically protect your quiz streak when you answer wrong
102-
- **Bonus Hints**: Use hints to eliminate wrong answers (ephemeral messages)
101+
- **Streak Freezes**: Protect your quiz streak when you answer wrong (consumes 1.0)
102+
- **Saves**: Protect the counting game when you ruin the count (consumes 1.0)
103103
- **Progress Tracking**: Monitor your daily quest completion in real-time
104104

105105
**Commands:**
106106
- `?dailyquest` / `?dq` / `?quests` - View daily quest progress
107107
- `/dailyquest` - View quest progress (slash command)
108-
- `?bonushint` / `?hint` - Use a bonus hint on active quiz
109-
- `?inventory` / `?inv` - Check your streak freezes and bonus hints
108+
- `?inventory` / `?inv` - Check your streak freezes and saves
110109

111110
**How It Works:**
112-
1. Complete 5 quiz questions correctly
113-
2. Vote for the bot (when available)
114-
3. Earn 1 Streak Freeze + 1 Bonus Hint
115-
4. Use rewards strategically to maintain your streak and climb leaderboards!
111+
1. Complete either quest (Quiz or Counting)
112+
2. Each quest completion awards **0.2** streak-freeze + **0.5** save
113+
3. Inventory caps: max **2.0** streak-freezes and **4.0** saves
114+
4. Use rewards strategically to maintain your streak and protect counting!
116115

117116
### ** Fun Commands**
118117
Entertainment and engagement features:
@@ -165,9 +164,12 @@ Celebrate community birthdays:
165164
Run a server counting game with anti-grief protections and highscores:
166165
- **Set Channel**: `/setcountingchannel <channel>` - Admin-only, choose the counting channel
167166
- **Double-count Warnings**: Counting twice in a row gives `⚠️` warnings (3 warnings triggers a fail)
167+
- **Save Protection**: If someone posts the wrong number, the bot tries to consume a **personal save** first, then a **server save**; otherwise the count resets to 0
168168
- **Deleted Number Logging**: If a valid counting number is deleted, the bot announces who deleted it
169169
- **Highscore Marker**: When the server reaches/ties the highscore, the message is marked with ✅ + 🏆 until the count is ruined
170170
- **Highscore Table**: `?highscoretable` / `/highscoretable` (and `?highscores`) - View recent highscore history
171+
- **Donate Saves to Server Pool**: `?donateguild` / `?dg` - Donate **1.0** personal save; server gains **0.5** save
172+
- **View Server Save Pool**: `?guildsaves` - Show current server saves (needs **1.0** to protect a ruined count)
171173

172174
### ** Staff Applications**
173175
Collect staff applications via DMs and review them in a configurable channel:

cogs/counting.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -648,6 +648,19 @@ async def donate_guild(self, ctx: commands.Context):
648648
f"Your saves: **{new_user_units/10:.1f}** • Server saves: **{new_guild_units/10:.1f}**"
649649
)
650650

651+
652+
@commands.command(name="guildsaves", aliases=["gsaves", "serversaves", "ssaves"])
653+
async def guild_saves(self, ctx: commands.Context):
654+
"""Show the server save pool used to protect counting mistakes."""
655+
if not ctx.guild:
656+
return await ctx.send("Server only command.")
657+
658+
units = await get_guild_save_units(ctx.guild.id)
659+
await ctx.send(
660+
f"Server saves: **{units/10:.1f}**\n"
661+
"(Needs **1.0** server save to protect a ruined count.)"
662+
)
663+
651664
@commands.hybrid_command(name="highscoretable", aliases=["highscores"], help="Show recent counting highscores")
652665
async def highscore_table(self, ctx: commands.Context):
653666
if not ctx.guild:

cogs/help.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@
4242
"codebuddyleaderboardcog": "View coding leaderboards, weekly stats, and streaks",
4343
"codebuddyquizcog": "Test your coding knowledge with quizzes",
4444
"codebuddyhelpcog": "Help and information for CodeBuddy features",
45-
"dailyquestscog": "Complete daily challenges to earn rewards! Solve quizzes, vote, and earn streak freezes & bonus hints",
46-
"counting": "Counting game with highscores, warnings, and leaderboards",
45+
"dailyquestscog": "Complete daily quests to earn partial streak freezes and saves (quiz + counting tasks)",
46+
"counting": "Counting game with warnings, highscores, and save protection",
4747
"staffapplications": "Staff application panel, review buttons, and admin config",
4848
"suggestions": "Submit suggestions with voting reactions + discussion threads",
4949
"bumpleaderboard": "Track Disboard /bump activity with leaderboards and stats",

0 commit comments

Comments
 (0)