Commit c36d7e6 1 parent d51ac80 commit c36d7e6 Copy full SHA for c36d7e6
File tree 1 file changed +5
-1
lines changed
foxy/src/main/kotlin/net/cakeyfox/foxy/utils/analytics
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 1
1
package net.cakeyfox.foxy.utils.analytics
2
2
3
3
import io.ktor.client.*
4
+ import io.ktor.client.plugins.contentnegotiation.*
4
5
import io.ktor.client.request.*
5
6
import io.ktor.client.statement.*
6
7
import io.ktor.http.*
8
+ import io.ktor.serialization.kotlinx.json.*
7
9
import kotlinx.coroutines.*
8
10
import kotlinx.serialization.json.Json
9
11
import kotlinx.serialization.json.buildJsonObject
@@ -41,7 +43,9 @@ class TopggStatsSender(
41
43
}
42
44
43
45
private suspend fun getServerCountsFromClusters (): Int {
44
- val client = HttpClient ()
46
+ val client = HttpClient {
47
+ install(ContentNegotiation ) { json() }
48
+ }
45
49
val clusterUrls = foxy.config.discord.clusters
46
50
.mapNotNull { if (! it.canPublishStats) it.clusterUrl else null }
47
51
You can’t perform that action at this time.
0 commit comments