code cleanup

optimized imports here and there, made CustomBot working as intended
This commit is contained in:
bpavuk
2024-07-10 19:23:36 +03:00
parent 9fb6570d21
commit 7964dc4eea
25 changed files with 141 additions and 196 deletions

View File

@@ -26,6 +26,7 @@ fun HTMLElement.log(text: String) {
appendElement("p", {})
}
@OptIn(ExperimentalUnsignedTypes::class)
fun main() {
console.log("Web app started")
val client = HttpClient()
@@ -38,7 +39,7 @@ fun main() {
scope.launchSafelyWithoutExceptions {
val response = client.post("$baseUrl/check") {
setBody(
Json { }.encodeToString(
Json.encodeToString(
WebAppDataWrapper.serializer(),
WebAppDataWrapper(webApp.initData, webApp.initDataUnsafe.hash)
)