From b15f1beeb603f2d0a350f978ea3f9a4ca5694960 Mon Sep 17 00:00:00 2001 From: MrPowerGamerBR Date: Wed, 30 Oct 2024 20:59:38 -0300 Subject: [PATCH] Remove same user check from the drop module --- .../morenitta/reactionevents/DropPointsStuffModule.kt | 8 -------- 1 file changed, 8 deletions(-) diff --git a/loritta-bot-discord/src/main/kotlin/net/perfectdreams/loritta/morenitta/reactionevents/DropPointsStuffModule.kt b/loritta-bot-discord/src/main/kotlin/net/perfectdreams/loritta/morenitta/reactionevents/DropPointsStuffModule.kt index 9e0d6f9516..fde7064580 100644 --- a/loritta-bot-discord/src/main/kotlin/net/perfectdreams/loritta/morenitta/reactionevents/DropPointsStuffModule.kt +++ b/loritta-bot-discord/src/main/kotlin/net/perfectdreams/loritta/morenitta/reactionevents/DropPointsStuffModule.kt @@ -30,8 +30,6 @@ class DropPointsStuffModule(val m: LorittaBot) : MessageReceivedModule { .asMap() private val lastDropsAt = Caffeine.newBuilder().expireAfterWrite(1, TimeUnit.HOURS).build() .asMap() - private val lastDropsByUserAt = Caffeine.newBuilder().expireAfterWrite(1, TimeUnit.HOURS).build() - .asMap() override suspend fun matches(event: LorittaMessageEvent, lorittaUser: LorittaUser, lorittaProfile: Profile?, serverConfig: ServerConfig, locale: BaseLocale, i18nContext: I18nContext): Boolean { val guild = event.guild ?: return false @@ -79,11 +77,6 @@ class DropPointsStuffModule(val m: LorittaBot) : MessageReceivedModule { if (1_000 >= lastDropDiff) return false - val userDropTime = lastDropsByUserAt.getOrDefault(event.author.idLong, 0L) - - if (10_000 >= date - userDropTime) - return false - for (reactionSet in activeEvent.reactionSets) { val randomNumber = LorittaBot.RANDOM.nextFloat() @@ -96,7 +89,6 @@ class DropPointsStuffModule(val m: LorittaBot) : MessageReceivedModule { if (spawnTheCandy) { lastDropsAt[id] = date - lastDropsByUserAt[event.author.idLong] = date // TODO: Fix this // val type = LorittaEaster2023Event.easterEggColors.random()