Skip to content

Plugin Enhancement: Counting — leaderboard, per-user stats, milestone roles, game modes #35

Description

@DeadIndian

Plugin Enhancement: Counting — leaderboard, per-user stats, milestone roles

Enhance adb-plugin-counting with user leaderboards, high-score tracking, per-user stats, milestone role rewards, and count streaks.

Why

The counting plugin is the bare minimum: one channel, resets on fail, milestone messages. The most popular counting bots have deep stats, competitive leaderboards, and role rewards that keep members engaged long-term.

Spec

New Features:

1. Per-User Stats

  • /counting stats [user] — Show counting stats for self or another user
    • Correct counts, wrong counts, best streak, current streak, total numbers contributed
  • /counting rank — Your rank in the leaderboard
  • /counting records — Server counting records (highest count ever reached, longest streak, etc.)

2. Leaderboard System

  • /counting leaderboard — Top 10 by correct count
  • /counting leaderboard streak — Top 10 by longest streak
  • /counting leaderboard fails — Top 10 by most wrong counts (shameboard)
  • Filter by time: all-time, monthly, weekly

3. Personal Best Streaks

  • Track longest consecutive correct counts per user
  • /counting streak [user] — Show current and best streak
  • Role rewards at streak milestones (/counting-role add 50 @Streaker)
  • Streak freeze: user's best streak never resets (configurable: user best vs session best)
  • Streak announcement: "User set a new personal record of 25!"

4. Milestone Role Rewards

  • /counting-role add <count> <role> — Assign role when server count reaches milestone
  • /counting-role remove <role> — Remove a milestone role
  • /counting-role list — List milestone roles
  • Example: at count 100 → @century role, at 500 → @Quincentennial role
  • Also: per-user count milestone roles (user contributed 1000 total)

5. Wrong Count Enhancements

  • /counting wrong-ping <role> — Role to ping when count is wrong
  • /counting wrong-action [delete|none] — Auto-delete wrong messages
  • /counting wrong-message <text> — Custom wrong count message (default: "X ruined it at Y!")
  • /counting grace <seconds> — Grace period after a wrong count for same user to fix it

6. Additional Game Modes

  • Race to X: "First to reach 1000 wins" mode with leaderboard
  • Reverse counting: Count down from 1000
  • Step counting: Count by 2s, 5s, 10s, etc. (/counting step 2)
  • Decimal counting: Count with decimals (1, 1.5, 2, 2.5...)

7. Stats Board

  • Auto-post a daily stats embed in a configured channel
  • Show: highest count achieved yesterday, most active counter, biggest fail

Config Schema Additions:

{
  "channel": null,
  "resetOnFail": true,
  "milestones": "10,25,50,100,250,500,1000",
  // New:
  "wrongPingRole": null,
  "wrongAction": "delete",        // 'delete' | 'none'
  "wrongMessage": "{user} ruined it at {count}!", 
  "gracePeriod": 0,              // seconds
  "step": 1,
  "mode": "ascending",           // 'ascending' | 'descending' | 'step'
  "statsChannel": null,
  "dailyStats": false
}

Model Additions:

// Per-user stats
{
  userId: String,
  guildId: String,
  correctCounts: Number,   // total correct inputs
  wrongCounts: Number,
  currentStreak: Number,
  bestStreak: Number,
  highestContribution: Number, // highest single count they contributed
  lastCountedAt: Date
}

// Server records
{
  guildId: String,
  highestCount: Number,
  longestStreakName: String,
  longestStreakCount: Number,
  mostActiveUser: String,
  totalCorrect: Number,
  totalWrong: Number
}

// Milestone role
{
  guildId: String,
  count: Number,           // server count target
  roleId: String
}

Acceptance Criteria

  • Per-user stats command (correct, wrong, streaks)
  • Leaderboard sorted by correct counts
  • Milestone role rewards at server count thresholds
  • Role rewards at user streak thresholds
  • Wrong count role pings and auto-delete
  • Daily stats auto-post in channel
  • Additional game modes (reverse, step)

Metadata

Metadata

Assignees

No one assigned

    Labels

    plugin-enhancementEnhancement to an existing plugin (add features, improve UX)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions