Skip to content

Commit

Permalink
Data Collector: Switch fork variable
Browse files Browse the repository at this point in the history
  • Loading branch information
gdude2002 committed Nov 8, 2024
1 parent 090c3dc commit 86d59c6
Showing 1 changed file with 9 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@ public class DataCollector(public val level: DataCollection) : KordExKoinCompone
@OptIn(InternalAPI::class)
@Suppress("TooGenericExceptionCaught")
internal suspend fun collect() {
/*
* If you're maintaining a fork of Kord Extensions, add the name of your fork below.
* Fork names should be lowered-kebab-case, ideally containing only lower-case letters, numbers, and dashes.
*/
val fork: String? = null // "fork-name"

if (!::applicationInfo.isInitialized) {
applicationInfo = bot.kordRef.getApplicationInfo()
}
Expand All @@ -105,6 +111,7 @@ public class DataCollector(public val level: DataCollection) : KordExKoinCompone
is DataCollection.Minimal ->
entity = MinimalDataEntity(
id = lastUUID,
fork = fork,

devMode = settings.devMode,
kordExVersion = KORDEX_VERSION ?: "Unknown",
Expand All @@ -118,6 +125,7 @@ public class DataCollector(public val level: DataCollection) : KordExKoinCompone
is DataCollection.Standard ->
entity = StandardDataEntity(
id = lastUUID,
fork = fork,

devMode = settings.devMode,
kordExVersion = KORDEX_VERSION ?: "Unknown",
Expand Down Expand Up @@ -175,6 +183,7 @@ public class DataCollector(public val level: DataCollection) : KordExKoinCompone

entity = ExtraDataEntity(
id = lastUUID,
fork = fork,

devMode = settings.devMode,
kordExVersion = KORDEX_VERSION ?: "Unknown",
Expand Down Expand Up @@ -269,18 +278,6 @@ public class DataCollector(public val level: DataCollection) : KordExKoinCompone

logger.debug { "Submitting collected data - level: ${level.readable}, last UUID: $lastUUID" }

/*
* If you're maintaining a fork of Kord Extensions, uncomment the following block of code and add the
* name of your fork.
*
* Fork names should be lowered-kebab-case, ideally containing only lower-case letters, numbers, and
* dashes.
*/

// entity = entity.copy(
// fork = "fork-name"
// )

val response = DataAPIClient.submit(entity)

setUUID(response)
Expand Down

0 comments on commit 86d59c6

Please sign in to comment.