From 2c57f7d0628e9cfd6a38f47c2c9dc7453d59d624 Mon Sep 17 00:00:00 2001 From: JonnyBro Date: Wed, 29 Dec 2021 22:49:09 +0500 Subject: [PATCH] yes --- events/message.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/events/message.js b/events/message.js index ffac3376..37b60ec2 100644 --- a/events/message.js +++ b/events/message.js @@ -49,7 +49,7 @@ module.exports = class { data.userData = userData; if (message.guild) { - await updateXp(message, data); + await updateXp(client, message, data); if (!message.channel.permissionsFor(message.member).has("MANAGE_MESSAGES") && !message.editedAt) { const channelSlowmode = data.guild.slowmode.channels.find((ch) => ch.id === message.channel.id); @@ -216,7 +216,7 @@ module.exports = class { * updateXp * This function update userdata by adding xp */ -async function updateXp(msg, data) { +async function updateXp(client, msg, data) { // Gets the user informations const points = parseInt(data.memberData.exp); const level = parseInt(data.memberData.level); @@ -232,7 +232,7 @@ async function updateXp(msg, data) { xpCooldown[msg.author.id] = toWait; // Gets a random number between 10 and 5 - const won = this.client.functions.randomNum(5, 10); + const won = client.functions.randomNum(5, 10); const newXp = parseInt(points + won, 10);