[$10] Leaderboard function

I have read and understand the Cogboard Bounty rules

Bounty Request Format:


I need leaderboards to print out top 10 users with certain values from a stored config. This will be copied and pasted to be used as a function in my other cogs in case I need leaderboards for other stuff. Leaderboards will be global.


import discord
from redbot.core import Config

	def __init__(self, bot: Red):
	        self.bot = bot
	       	userdata = {
	            "userdata": {
	                "value": 0
	        self.config = Config.get_conf(self, 123456789)

    async def valueset(self, ctx, value):
        """Set value"""
        await self.config.user(author).userdata.value.set(value)
        await ctx.send("Value has been set")

    async def value(self, ctx):
        """Recall value"""
        v = await self.config.user(author).userdata.value.()
        await ctx.send(f"Your value is {v}")

    async def topvalue(self, ctx):
        """Value leaderboards"""
        await ctx.send(f"Top 10:")

Payment: $10 via PayPal


Feel free to shoot me a DM on discord (Vertyco#0117)
I have a few cogs that use leaderboards in a few different styles i can probably adapt to suit your needs.

Update: The bounty has been completed and paid.