Added support for getting leaderboard size back with position #4433
No reviewers
Labels
No labels
Automated PR
Blocked
Blocked By: Damage Control
Blocked By: Dependency
Blocked By: Other PR
Breaking Change
Category: CI
Category: Cogs - Admin
Category: Cogs - Alias
Category: Cogs - Audio
Category: Cogs - Bank
Category: Cogs - Cleanup
Category: Cogs - CustomCommands
Category: Cogs - Dev
Category: Cogs - Downloader
Category: Cogs - Economy
Category: Cogs - Filter
Category: Cogs - General
Category: Cogs - Image
Category: Cogs - Mod
Category: Cogs - Modlog
Category: Cogs - Mutes
Category: Cogs - Permissions
Category: Cogs - Reports
Category: Cogs - Streams
Category: Cogs - Trivia
Category: Cogs - Trivia - Lists
Category: Cogs - Warnings
Category: Core - API - App Commands Package
Category: Core - API - Audio
Category: Core - API - Bank
Category: Core - API - Commands Package
Category: Core - API - Config
Category: Core - API - Other
Category: Core - API - Utils Package
Category: Core - Bot Class
Category: Core - Bot Commands
Category: Core - Command-line Interfaces
Category: Core - Downloader
Category: Core - Help
Category: Core - i18n
Category: Core - Modlog
Category: Core - Other Internals
Category: Core - RPC/ZMQ
Category: Docker
Category: Docs - Changelogs
Category: Docs - For Developers
Category: Docs - Install Guides
Category: Docs - Other
Category: Docs - User Guides
Category: Meta
Category: RPC/ZMQ methods
Category: Vendored Packages
Changelog Entry: Added
Changelog Entry: Pending
Changelog Entry: Skipped
Closed: Duplicate
Closed: External
Closed: Invalid
Closed: User Error
Closed: Won't Fix
Complex Issue
Docs-only
Feature Branch
Good First Issue
Help Wanted
High Priority
Needs Backport To stable-docs
No Activity
No Repro
QA: Bypassed
QA: Changes Requested
QA: Passed
Release Blocker
Status: Accepted
Status: Frozen
Status: In Progress
Status: Needs Discussion
Status: Needs Info
Status: Needs Triage
Status: PRs Welcome
Type: Bug
Type: Dependency Update
Type: Deprecation
Type: Enhancement
Type: Feature
Type: Informational
Type: Merge
Type: Optimisation
Type: Question
Type: Removal
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Mrcoolgamer11/Red-DiscordBot!4433
Loading…
Reference in a new issue
No description provided.
Delete branch "MrBillson/issue4200"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type
Description of the changes
Added support for getting leaderboard size back with position. You can now pass in an optional param that is a flag to return the overall leaderboard size or not. This is the enhancement requested in issue 4200. This is a backwards compatible non-breaking change.
closes #4200
Just a quick initial review from my phone, also I noticed something like 578 states the return type in an int, that's incorrect since it's an Optional[int], would you mind tweaking that while working on this pr? If not it's fine it can be done in a separate PR.
You will notice I've renamed some of the variables you have added, this is to ensure we are following PEP and keeping variable naming motion consistent across the project.
Great feedback. I have a better idea on contributing to this project now!
I think all of the requested changes are done. Let me know if not. Thanks!
This is awkward, I forgot to assign it to me so I missed your changed, Approving for now.
@jack1142 this one is on the milestone for 3.4.11, but just in case merging would make your life harder, please go ahead and merge when it is a good time.
Jack suggested this should be changed into a keyword-only arg, so if you can do this too it would be awesome.
Once the pending suggestion is addressed I can merge this one for you @MrBillson
I'm not sure that I like returning a tuple or an integer depending on a kwarg value here instead of just having a new function. Or maybe even not doing either, because one can just use
get_leaderboard()and manually get the data. It's not likeget_leaderboard_position()has some optimisations. Marking for discussion.get_leaderboard_positionreturns a tuple with user position and total entries in leaderboard #4200