Skip to content

Commit

Permalink
Add reaction guild member threshold
Browse files Browse the repository at this point in the history
  • Loading branch information
MrPowerGamerBR committed Oct 28, 2024
1 parent 369bec4 commit 183c9f1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ class DropPointsStuffModule(val m: LorittaBot) : MessageReceivedModule {
if (lorittaProfile == null)
return false

if (event.guild == null)
return false

val now = Instant.now()

// Get the current active event
val activeEvent = ReactionEventsAttributes.getActiveEvent(now) ?: return false

if (event.guild == null || activeEvent.guildMemberThreshold > event.guild.memberCount)
return false

val date = System.currentTimeMillis()

val id = event.channel.idLong
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ abstract class ReactionEvent {
abstract val endsAt: Instant
abstract val reactionSets: List<ReactionSet>
abstract val rewards: List<ReactionEventReward>
open val guildMemberThreshold = 1_000

abstract fun createJoinMessage(context: UnleashedContext): InlineMessage<*>.() -> (Unit)

Expand Down

0 comments on commit 183c9f1

Please sign in to comment.