From 4c73fd2b2571a2ee22e5073f27424ed01c6348ef Mon Sep 17 00:00:00 2001 From: JonnyBro Date: Sun, 27 Mar 2022 13:39:14 +0500 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=BC=D0=B5=D0=BD=D1=8C=D1=88=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20=D0=BA=D0=BE=D0=BB-=D0=B2=D0=BE=20=D0=BE=D0=BF?= =?UTF-8?q?=D1=8B=D1=82=D0=B0=20=D0=B7=D0=B0=20=D1=81=D0=BE=D0=BE=D0=B1?= =?UTF-8?q?=D1=89=D0=B5=D0=BD=D0=B8=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- events/messageCreate.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/events/messageCreate.js b/events/messageCreate.js index 2ae2420d..d917fa78 100644 --- a/events/messageCreate.js +++ b/events/messageCreate.js @@ -12,24 +12,20 @@ module.exports = class { const data = {}; - // If the message author is a bot if (message.author.bot) return; - // If the member on a guild is invisible or not cached, fetch them. if (message.guild && !message.member) await message.guild.members.fetch(message.author.id); const client = this.client; data.config = client.config; if (message.guild) { - // Gets guild data const guild = await client.findOrCreateGuild({ id: message.guild.id }); message.guild.data = data.guild = guild; } - // Check if the bot was mentionned if (message.content.match(new RegExp(`^<@!?${client.user.id}>( |)$`))) { if (message.guild) return message.sendT("misc:HELLO_SERVER", { username: message.author.username, prefix: data.guild.prefix }); else return message.sendT("misc:HELLO_DM"); @@ -38,7 +34,6 @@ module.exports = class { if (message.content.includes("@someone") && message.guild && client.commands.get("someone").conf.enabled) return client.commands.get("someone").run(message, null, data); if (message.guild) { - // Gets the data of the member const memberData = await client.findOrCreateMember({ id: message.author.id, guildID: message.guild.id @@ -108,7 +103,6 @@ module.exports = class { }); } - // Gets the prefix const prefix = client.functions.getPrefix(message, data); if (!prefix) return; @@ -223,7 +217,7 @@ async function updateXp(client, msg, data) { const toWait = Date.now() + 60000; // 1 min xpCooldown[msg.author.id] = toWait; - const won = client.functions.randomNum(2, 5); + const won = client.functions.randomNum(1, 4); const newXp = parseInt(points + won, 10); const neededXp = 5 * (level * level) + 80 * level + 100;