Skip to content

Conversation

@ReenigneArcher
Copy link
Member

@ReenigneArcher ReenigneArcher commented May 19, 2025

Description

This PR changes the following:

  • Adds levels/ranking system for both discord and reddit
  • Migrates existing levels from mee6 for discord
  • For discord xp between 15 and 25 will awarded for each minute that a user is messaging
  • For reddit xp between 150 and 250 will be awarded for every minute that a user creates or comments on a submission
  • Adds a rank slash command
  • Adds a leaderboard slash command

TODO:

  • Discord leaderboard slash command to support reddit users
  • Specify channel to send Discord level up message to
  • Determine if new slash commands should be added to reddit (reddit cogs?)
  • Use new Database.query wherever tinydb.Query is used
  • Possibly, allow paging through leaderboard
  • Record new betamax cassettes/fixtures
  • Unit testing and coverage

Screenshot

image

image

Issues Fixed or Closed

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Dependency update (updates to dependencies)
  • Documentation update (changes to documentation)
  • Repository update (changes to repository files, e.g. .github/...)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated the in code docstring/documentation-blocks for new or existing methods/components

@codecov
Copy link

codecov bot commented May 19, 2025

Codecov Report

❌ Patch coverage is 37.81250% with 398 lines in your changes missing coverage. Please review.
✅ Project coverage is 52.11%. Comparing base (1df4d79) to head (cafdc7e).
⚠️ Report is 12 commits behind head on master.

Files with missing lines Patch % Lines
src/common/rank.py 36.05% 149 Missing ⚠️
src/discord_bot/cogs/rank.py 27.94% 147 Missing ⚠️
src/common/rank_database.py 33.33% 62 Missing ⚠️
src/common/database.py 43.90% 23 Missing ⚠️
src/reddit_bot/bot.py 73.84% 17 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #406      +/-   ##
==========================================
- Coverage   60.30%   52.11%   -8.20%     
==========================================
  Files          21       24       +3     
  Lines        1164     1750     +586     
==========================================
+ Hits          702      912     +210     
- Misses        462      838     +376     
Files with missing lines Coverage Δ
src/common/webapp.py 96.85% <100.00%> (-0.03%) ⬇️
src/reddit_bot/bot.py 67.26% <73.84%> (-2.23%) ⬇️
src/common/database.py 44.19% <43.90%> (+3.61%) ⬆️
src/common/rank_database.py 33.33% <33.33%> (ø)
src/discord_bot/cogs/rank.py 27.94% <27.94%> (ø)
src/common/rank.py 36.05% <36.05%> (ø)

... and 1 file with indirect coverage changes

@ReenigneArcher ReenigneArcher force-pushed the feat/levels/add-levels-leaderboard branch 25 times, most recently from 8780c06 to 984396a Compare May 23, 2025 20:33
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
3 New issues
3 New Code Smells (required ≤ 0)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@ReenigneArcher ReenigneArcher force-pushed the feat/levels/add-levels-leaderboard branch from 984396a to 8942723 Compare July 2, 2025 01:31
@ReenigneArcher ReenigneArcher force-pushed the feat/levels/add-levels-leaderboard branch from 8942723 to 3bc5088 Compare July 16, 2025 13:59
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
5 New issues
3 Security Hotspots
5 New Code Smells (required ≤ 0)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@LizardByte-bot
Copy link
Member

It looks like this PR has been idle for 90 days. If it's still something you're working on or would like to pursue, please leave a comment or update your branch. Otherwise, we'll be closing this PR in 10 days to reduce our backlog. Thanks!

@LizardByte-bot LizardByte-bot added the stale This issue is stale. label Oct 15, 2025
@ReenigneArcher ReenigneArcher removed the stale This issue is stale. label Oct 15, 2025
@ReenigneArcher ReenigneArcher force-pushed the feat/levels/add-levels-leaderboard branch from 3bc5088 to cafdc7e Compare October 15, 2025 12:39
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
5 New issues
3 Security Hotspots
5 New Code Smells (required ≤ 0)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

support-bot: migrate mee6 functionality Migrate mee6 functionality

3 participants