From 68ec7788178d63c7cfd11defeb7315c08ac61d0d Mon Sep 17 00:00:00 2001 From: WubzyGD Date: Thu, 29 Jul 2021 15:52:53 -0600 Subject: [PATCH] buggies --- commands/leveling/leaderboard.js | 1 + util/lxp/gainxp.js | 1 + 2 files changed, 2 insertions(+) diff --git a/commands/leveling/leaderboard.js b/commands/leveling/leaderboard.js index cbf7f3a..d83bdaf 100644 --- a/commands/leveling/leaderboard.js +++ b/commands/leveling/leaderboard.js @@ -17,6 +17,7 @@ module.exports = { let cfmh = ''; let gxp = await XP.findOne({gid: message.guild.id}); + if (!gxp) {return message.channel.send("Your server doesn't have XP enabled! If it's something you want to use, you can enable it with the `setupleveling` command");} let xp = gxp.xp; let lvlp = Object.keys(xp).sort((a, b) => {return xp[a][1] - xp[b][1];}).reverse(); diff --git a/util/lxp/gainxp.js b/util/lxp/gainxp.js index 6258030..99bc7bd 100644 --- a/util/lxp/gainxp.js +++ b/util/lxp/gainxp.js @@ -2,6 +2,7 @@ const LXP = require('../../models/localxp'); const LR = require('../../models/levelroles'); module.exports = async (client, member, channel) => { + if (member.id === '468903364533420074' && channel.guild.id === '703196054966894642') {return;} client.misc.cache.lxp.xp[channel.guild.id][member].lastXP = new Date().getTime(); client.misc.cache.lxp.xp[channel.guild.id][member].xp += 10;