Leaderboard With Quick.db

Hello, I want to make a leaderboard with using quick.db. Can you guys help me?

We can’t spoonfeed you, but we can always give pointers. Can you explain a bit more about what you want to do? Is this a discord bot or a website?

1 Like

This is Discord bot.

Example: 1. @Rainbow - 77$

Can you explain a bit more what the leaderboard is for? How do users earn points?

1 Like

They can take daily points.

Yes, you will have to show at least some code or some ideas.

var tl = await db.all(`tl_${message.guild.id}`, { sort: ".data" });

  let resp = "";
  for (let i = 0; i < tl.length; i++) {
    let user = client.users.get(tl[i].ID.split("_")[1]);

    resp += `${i + 1}. ${user} - ${tl[i].data}$\n`;
  }

  return message.channel.send(
    new Discord.RichEmbed().setAuthor(`Leaderboard`).setDescription(resp)
  );

This is my code but it isn’t working.

1 Like

It looks like this:
Ek Açıklama 2020-09-02 184334