From d8e49cabdb7f32996decc859481f77cfafac8dba Mon Sep 17 00:00:00 2001 From: vb2007 Date: Sun, 28 Jul 2024 22:48:57 +0200 Subject: [PATCH] added empty leaderboard handling to /leaderboard --- commands/economy/leaderboard.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/commands/economy/leaderboard.js b/commands/economy/leaderboard.js index 20bb4dd..12b2a37 100644 --- a/commands/economy/leaderboard.js +++ b/commands/economy/leaderboard.js @@ -28,6 +28,10 @@ module.exports = { var replyContent = query.map((user, index) => `${index + 1}. ${user.userName} : ${user.balance}$ :moneybag:` ).join("\n"); + + if (replyContent === "") { + replyContent = "No users found with a balance on this server."; + } } var embedReply = new EmbedBuilder({