From 975e39be5d0567437dc24edfe7afa9c9aa971c3a Mon Sep 17 00:00:00 2001 From: tookender Date: Thu, 30 May 2024 21:14:33 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1=20Replace=20Double=20XP=20with=20Leve?= =?UTF-8?q?lling=20Multiplier?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extensions/levelling/events.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/extensions/levelling/events.py b/extensions/levelling/events.py index 272b4f8..2cea51a 100644 --- a/extensions/levelling/events.py +++ b/extensions/levelling/events.py @@ -34,9 +34,8 @@ async def levelling(self, message: discord.Message): # Amount of XP the user should get for the message random_xp = random.randint(24, 34) + (random.randint(4, 7) if len(message.content) > random.randint(34, 44) else 0) - double_xp = await self.bot.pool.fetchval("SELECT levelling_double_xp FROM guilds WHERE guild_id = $1", message.guild.id) - if double_xp: - random_xp = random_xp * 2 + multiplier = await self.bot.pool.fetchval("SELECT levelling_multiplier FROM guilds WHERE guild_id = $1", message.guild.id) + random_xp = random_xp * multiplier data = await self.bot.pool.fetchrow( "SELECT level, xp FROM levels WHERE guild_id = $1 AND user_id = $2",