Skip to content

Commit

Permalink
Add guildAddedAt field to Guild data class
Browse files Browse the repository at this point in the history
  • Loading branch information
WinG4merBR committed Jan 13, 2025
1 parent f09f06c commit 2d6951e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import kotlinx.serialization.Serializable
@Serializable
data class Guild(
val _id: String,
val guildAddedAt: Long,
val GuildJoinLeaveModule: WelcomerModule,
val AutoRoleModule: AutoRoleModule,
val antiRaidModule: AntiRaidModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,8 @@ class TopggStatsSender(
logger.info { "Running TopggStatsSender on Main Cluster" }

statsSenderJob = CoroutineScope(Dispatchers.IO).launch {
while (true) {
val serverCounts = getServerCountsFromClusters()
sendStatsToTopGG(serverCounts)
delay(3600000)
}
val serverCounts = getServerCountsFromClusters()
sendStatsToTopGG(serverCounts)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class GuildUtils(

val newGuild = Guild(
_id = guildId,
guildAddedAt = System.currentTimeMillis(),
GuildJoinLeaveModule = WelcomerModule(),
antiRaidModule = AntiRaidModule(),
AutoRoleModule = AutoRoleModule(),
Expand Down

0 comments on commit 2d6951e

Please sign in to comment.