Skip to content

Commit

Permalink
Merge pull request #38 from muricans/mbot-testing
Browse files Browse the repository at this point in the history
7.6.1
  • Loading branch information
muricans authored Jun 10, 2019
2 parents 4f5aeac + 469dc87 commit e98f64f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions commands/roulette/leaderboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ module.exports = {

function leaderboard(message, client) {
return new Promise((resolve) => {
db.all('SELECT points points, id id FROM users ORDER BY points DESC', async (err, rows) => {
db.all('SELECT points points, id id FROM users ORDER BY points DESC LIMIT 0,50', async (err, rows) => {
if (err) return console.log(err);
const embeds = [];
if (!rows.length) return message.channel.send('No users found!');
const each = new Promise(async (resolve) => {
const each = new Promise((resolve) => {
const users = [];
rows.forEach((val, i, arr) => {
users.push({
Expand Down Expand Up @@ -70,6 +70,8 @@ function leaderboard(message, client) {
}
}
}
for (let i = 0; i < embeds.length; i++)
embeds[i].setTitle('Points Leaderboard');
});
return resolve(embeds);
});
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "mbot",
"version": "7.6.0",
"description": "Private discord bot",
"version": "7.6.1",
"description": "Discord bot",
"main": "mbot.js",
"scripts": {
"test": "node test.js"
Expand Down

0 comments on commit e98f64f

Please sign in to comment.