diff --git a/CHANGELOG.md b/CHANGELOG.md index 0945021b5e..92812809d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # TelegramBotAPI changelog +## 0.20.0 MPP Migration + +* Time library change: `joda-time` -> `com.soywiz.korlibs.klock:klock` +* `Currencied` now using as `currency` value with type `String` + * For `Java` there is `Currencied#javaCurrency` extension function, which will give an old currency work way +* `User` now have no field `userLocale` + * For `Java` there is `User#javaLocale` extension function, which will give an old locale work way + ## 0.19.0 ImplicitReflection removing * Total rework of serialization for requests. Now all `SimpleRequest` children have: diff --git a/README.md b/README.md index 8d4841f020..255d1a2eb6 100644 --- a/README.md +++ b/README.md @@ -25,8 +25,30 @@ like inserting of additional libraries (like `kotlin stdlib`). In the examples w [![Download](https://api.bintray.com/packages/insanusmokrassar/StandardRepository/TelegramBotAPI/images/download.svg) ](https://bintray.com/insanusmokrassar/StandardRepository/TelegramBotAPI/_latestVersion) +Currently, last versions of library are not included into the Maven repository (for the reason difficult in publishing +of signed artifacts in Bintray). You can: + +* Use earlier version (available version you can find +[here](https://mvnrepository.com/artifact/com.github.insanusmokrassar/TelegramBotAPI)) +* Add `jCenter` repository in build config + ### Maven +To use last versions you will need to add several lines in repositories block of your pom.xml: + +```xml + + + false + + central + bintray + http://jcenter.bintray.com + +``` + +Dependency config presented here: + ```xml com.github.insanusmokrassar @@ -37,14 +59,22 @@ like inserting of additional libraries (like `kotlin stdlib`). In the examples w ### Gradle +To use last versions you will need to add one line in repositories block of your build.gradle: + ```groovy -implementation "com.github.insanusmokrassar:TelegramBotAPI:${telegrambotapi.version}" +jcenter() ``` -### Gradle (old) +And add next line to your dependencies block: ```groovy -compile "com.github.insanusmokrassar:TelegramBotAPI:${telegrambotapi.version}" +implementation "com.github.insanusmokrassar:TelegramBotAPI:$telegrambotapi_version" +``` + +or for old gradle: + +```groovy +compile "com.github.insanusmokrassar:TelegramBotAPI:$telegrambotapi_version" ``` ## How to work with library? diff --git a/build.gradle b/build.gradle index c29d199dcb..556ba50fe5 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,3 @@ -project.version = "0.19.0" -project.group = "com.github.insanusmokrassar" - buildscript { repositories { mavenLocal() @@ -15,9 +12,13 @@ buildscript { } } -apply plugin: 'java-library' -apply plugin: 'kotlin' -apply plugin: 'kotlinx-serialization' +plugins { + id "org.jetbrains.kotlin.multiplatform" version "$kotlin_version" + id "org.jetbrains.kotlin.plugin.serialization" version "$kotlin_version" +} + +project.version = "0.20.0" +project.group = "com.github.insanusmokrassar" apply from: "publish.gradle" @@ -28,17 +29,53 @@ repositories { maven { url "https://kotlin.bintray.com/kotlinx" } } -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" - api "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlin_coroutines_version" - api "org.jetbrains.kotlinx:kotlinx-serialization-runtime:$kotlin_serialisation_runtime_version" - api "joda-time:joda-time:$joda_time_version" +kotlin { + jvm() + js() - api "io.ktor:ktor-client:$ktor_version" - api "io.ktor:ktor-client-cio:$ktor_version" + sourceSets { + commonMain { + dependencies { + implementation kotlin('stdlib') + api "org.jetbrains.kotlinx:kotlinx-coroutines-core-common:$kotlin_coroutines_version" + api "org.jetbrains.kotlinx:kotlinx-serialization-runtime-common:$kotlin_serialisation_runtime_version" - api "io.ktor:ktor-server:$ktor_version" - api "io.ktor:ktor-server-host-common:$ktor_version" + api "com.soywiz.korlibs.klock:klock:$klock_version" + api "com.benasher44:uuid:$uuid_version" - testImplementation "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version" + api "io.ktor:ktor-client-core:$ktor_version" + } + } + commonTest { + dependencies { + implementation kotlin('test-common') + implementation kotlin('test-annotations-common') + } + } + + jvmMain { + dependencies { + api "org.jetbrains.kotlinx:kotlinx-serialization-runtime:$kotlin_serialisation_runtime_version" + + api "io.ktor:ktor-client:$ktor_version" + api "io.ktor:ktor-server:$ktor_version" + + api "io.ktor:ktor-server-host-common:$ktor_version" + api "io.ktor:ktor-client-cio:$ktor_version" + } + } + jvmTest { + dependencies { + implementation kotlin('test-junit') + } + } + + jsMain { + dependencies { + api "org.jetbrains.kotlinx:kotlinx-serialization-runtime-js:$kotlin_serialisation_runtime_version" + api "org.jetbrains.kotlinx:kotlinx-coroutines-core-js:$kotlin_coroutines_version" + api "io.ktor:ktor-client-js:$ktor_version" + } + } + } } diff --git a/gradle.properties b/gradle.properties index 7a43a40eb0..661eb0ae84 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,8 @@ kotlin.code.style=official kotlin_version=1.3.61 kotlin_coroutines_version=1.3.2 kotlin_serialisation_runtime_version=0.14.0 -joda_time_version=2.10.5 +klock_version=1.8.0 +uuid_version=0.0.6 ktor_version=1.2.6 gradle_bintray_plugin_version=1.8.4 diff --git a/maven.publish.gradle b/maven.publish.gradle index f0237c2947..cb97827fd0 100644 --- a/maven.publish.gradle +++ b/maven.publish.gradle @@ -1,56 +1,52 @@ apply plugin: 'maven-publish' apply plugin: 'signing' -task sourcesJar(type: Jar) { - from sourceSets.main.allSource - classifier = 'sources' -} - -task javadocJar(type: Jar) { - from javadoc +task javadocsJar(type: Jar) { classifier = 'javadoc' } +afterEvaluate { + project.publishing.publications.all { + // rename artifacts + groupId "${project.group}" + if (it.name.contains('kotlinMultiplatform')) { + artifactId = "${project.name}" + } else { + artifactId = "${project.name}-$name" + } + } +} + publishing { - publications { - maven(MavenPublication) { - from components.java - groupId "${project.group}" - artifactId "${project.name}" - version "${project.version}" + publications.all { + artifact javadocsJar - artifact sourcesJar - artifact javadocJar - - pom.withXml { - asNode().children().last() + { - resolveStrategy = Closure.DELEGATE_FIRST - name "${project_public_name}" - description "${project_public_description}" - url "https://insanusmokrassar.github.io/${project.name}" + pom.withXml { + asNode().children().last() + { + resolveStrategy = Closure.DELEGATE_FIRST - scm { - connection "scm:git:git://github.com/insanusmokrassar/${project.name}.git" - developerConnection "scm:git:[fetch=]https://github.com/insanusmokrassar/${project.name}.git[push=]ssh:git@github.com:insanusmokrassar/${project.name}.git" - url "https://github.com/insanusmokrassar/${project.name}" + description "Library for Object-Oriented and type-safe work with Telegram Bot API" + name "Telegram Bot API" + url "https://insanusmokrassar.github.io/TelegramBotAPI" - } + scm { + developerConnection "scm:git:[fetch=]https://github.com/insanusmokrassar/TelegramBotAPI.git[push=]https://github.com/insanusmokrassar/TelegramBotAPI.git" + url "https://github.com/insanusmokrassar/TelegramBotAPI.git" + } - developers { + developers { developer { id "InsanusMokrassar" - name "Ovsyannikov Alexey" + name "Ovsiannikov Aleksei" email "ovsyannikov.alexey95@gmail.com" } - } + } - licenses { + licenses { license { - name 'The Apache Software License, Version 2.0' - url 'https://github.com/InsanusMokrassar/TelegramBotAPI/blob/master/LICENSE' - distribution 'repo' + name "Apache Software License 2.0" + url "https://github.com/InsanusMokrassar/TelegramBotAPI/blob/master/LICENSE" } - } } } } @@ -59,5 +55,5 @@ publishing { signing { useGpgCmd() - sign publishing.publications.maven + sign(publishing.publications) } diff --git a/mpp_publish_template.json b/mpp_publish_template.json new file mode 100644 index 0000000000..0da26b7372 --- /dev/null +++ b/mpp_publish_template.json @@ -0,0 +1 @@ +{"bintrayConfig":{"repo":"StandardRepository","packageName":"${project.name}","packageVcs":"https://github.com/InsanusMokrassar/TelegramBotAPI"},"licenses":[{"id":"Apache-2.0","title":"Apache Software License 2.0","url":"https://github.com/InsanusMokrassar/TelegramBotAPI/blob/master/LICENSE"}],"mavenConfig":{"name":"Telegram Bot API","description":"Library for Object-Oriented and type-safe work with Telegram Bot API","url":"https://insanusmokrassar.github.io/TelegramBotAPI","vcsUrl":"https://github.com/insanusmokrassar/TelegramBotAPI.git","developers":[{"id":"InsanusMokrassar","name":"Ovsiannikov Aleksei","eMail":"ovsyannikov.alexey95@gmail.com"}]}} \ No newline at end of file diff --git a/publish.gradle b/publish.gradle index 6e8de12578..f8198784af 100644 --- a/publish.gradle +++ b/publish.gradle @@ -1,33 +1,27 @@ apply plugin: 'com.jfrog.bintray' -ext { - projectBintrayDir = "${project.group}/".replace(".", "/") + "${project.name}/${project.version}" -} +apply from: "maven.publish.gradle" bintray { user = project.hasProperty('BINTRAY_USER') ? project.property('BINTRAY_USER') : System.getenv('BINTRAY_USER') key = project.hasProperty('BINTRAY_KEY') ? project.property('BINTRAY_KEY') : System.getenv('BINTRAY_KEY') - publications = ["maven"] - filesSpec { - into "$projectBintrayDir" - from("build/libs") { - include "**/*.asc" - } - from("build/publications/maven") { - rename 'pom-default.xml(.*)', "${project.name}-${project.version}.pom\$1" - } - } pkg { - repo = 'StandardRepository' + repo = "StandardRepository" name = "${project.name}" - vcsUrl = "https://github.com/InsanusMokrassar/${project.name}" - licenses = ['Apache-2.0'] + vcsUrl = "https://github.com/InsanusMokrassar/TelegramBotAPI" + licenses = ["Apache-2.0"] version { name = "${project.version}" released = new Date() - vcsTag = name + vcsTag = "${project.version}" } } } -apply from: "maven.publish.gradle" +bintrayUpload.doFirst { + publications = publishing.publications.collect { + it.name + } +} + +bintrayUpload.dependsOn publishToMavenLocal \ No newline at end of file diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/Captioned.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/Captioned.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/Captioned.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/Captioned.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/CommonContactData.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/CommonContactData.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/CommonContactData.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/CommonContactData.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/CommonVenueData.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/CommonVenueData.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/CommonVenueData.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/CommonVenueData.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/Livable.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/Livable.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/Livable.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/Livable.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/Locationed.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/Locationed.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/Locationed.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/Locationed.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/MimeTyped.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/MimeTyped.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/MimeTyped.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/MimeTyped.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/Performerable.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/Performerable.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/Performerable.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/Performerable.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/Titled.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/Titled.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/Titled.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/Titled.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/types/ChatRequest.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/types/ChatRequest.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/types/ChatRequest.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/types/ChatRequest.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/types/DisableNotification.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/types/DisableNotification.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/types/DisableNotification.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/types/DisableNotification.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/types/DisableWebPagePreview.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/types/DisableWebPagePreview.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/types/DisableWebPagePreview.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/types/DisableWebPagePreview.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/types/InlineMessageAction.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/types/InlineMessageAction.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/types/InlineMessageAction.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/types/InlineMessageAction.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/types/MessageAction.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/types/MessageAction.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/types/MessageAction.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/types/MessageAction.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/types/ReplyMarkup.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/types/ReplyMarkup.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/types/ReplyMarkup.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/types/ReplyMarkup.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/types/ReplyMessageId.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/types/ReplyMessageId.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/types/ReplyMessageId.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/types/ReplyMessageId.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/types/UntilDate.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/types/UntilDate.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/types/UntilDate.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/CommonAbstracts/types/UntilDate.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/BaseRequestsExecutor.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/BaseRequestsExecutor.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/BaseRequestsExecutor.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/BaseRequestsExecutor.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/Ktor/KtorCallFactory.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/Ktor/KtorCallFactory.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/Ktor/KtorCallFactory.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/Ktor/KtorCallFactory.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/Ktor/KtorRequestsExecutor.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/Ktor/KtorRequestsExecutor.kt similarity index 93% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/Ktor/KtorRequestsExecutor.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/Ktor/KtorRequestsExecutor.kt index bd768347fe..dd2ccb174f 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/Ktor/KtorRequestsExecutor.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/Ktor/KtorRequestsExecutor.kt @@ -12,8 +12,7 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.RetryAfterError import com.github.insanusmokrassar.TelegramBotAPI.utils.TelegramAPIUrlsKeeper import io.ktor.client.HttpClient import io.ktor.client.call.HttpClientCall -import io.ktor.client.engine.HttpClientEngine -import io.ktor.util.cio.toByteArray +import io.ktor.client.call.receive import kotlinx.coroutines.delay import kotlinx.serialization.json.Json @@ -49,9 +48,7 @@ class KtorRequestsExecutor( if (call == null) { throw IllegalArgumentException("Can't execute request: $request") } - val content = call.response.use { - it.content.toByteArray().toString(Charsets.UTF_8) - } + val content = call.response.receive() val responseObject = jsonFormatter.parse(Response.serializer(), content) (responseObject.result ?.let { diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/Ktor/base/AbstractRequestCallFactory.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/Ktor/base/AbstractRequestCallFactory.kt similarity index 90% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/Ktor/base/AbstractRequestCallFactory.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/Ktor/base/AbstractRequestCallFactory.kt index c924a84bd6..b843a61d34 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/Ktor/base/AbstractRequestCallFactory.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/Ktor/base/AbstractRequestCallFactory.kt @@ -5,10 +5,8 @@ import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.Request import io.ktor.client.HttpClient import io.ktor.client.call.HttpClientCall import io.ktor.client.call.call -import io.ktor.client.request.accept -import io.ktor.client.request.url -import io.ktor.http.ContentType -import io.ktor.http.HttpMethod +import io.ktor.client.request.* +import io.ktor.http.* abstract class AbstractRequestCallFactory : KtorCallFactory { private val methodsCache: MutableMap = mutableMapOf() diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/Ktor/base/MultipartRequestCallFactory.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/Ktor/base/MultipartRequestCallFactory.kt similarity index 89% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/Ktor/base/MultipartRequestCallFactory.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/Ktor/base/MultipartRequestCallFactory.kt index 5884104497..3a3ccf97bb 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/Ktor/base/MultipartRequestCallFactory.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/Ktor/base/MultipartRequestCallFactory.kt @@ -21,14 +21,15 @@ class MultipartRequestCallFactory : AbstractRequestCallFactory() { val params = castedRequest.paramsJson.mapWithCommonValues() for ((key, value) in castedRequest.mediaMap + params) { when (value) { - is MultipartFile -> append( + is MultipartFile -> appendInput( key, - value.file.asInput().readBytes(), Headers.build { append(HttpHeaders.ContentType, value.mimeType) append(HttpHeaders.ContentDisposition, "filename=${value.fileId}") } - ) + ) { + value.file.asInput() + } is FileId -> append(key, value.fileId) else -> append(key, value.toString()) } diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/Ktor/base/SimpleRequestCallFactory.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/Ktor/base/SimpleRequestCallFactory.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/Ktor/base/SimpleRequestCallFactory.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/Ktor/base/SimpleRequestCallFactory.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/RequestsExecutor.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/RequestsExecutor.kt similarity index 69% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/RequestsExecutor.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/RequestsExecutor.kt index c8e8c52010..862cf0d754 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/RequestsExecutor.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/RequestsExecutor.kt @@ -1,10 +1,11 @@ package com.github.insanusmokrassar.TelegramBotAPI.bot -import com.github.insanusmokrassar.TelegramBotAPI.bot.exceptions.RequestException import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.Request import kotlinx.io.core.Closeable interface RequestsExecutor : Closeable { - @Throws(RequestException::class) + /** + * @throws com.github.insanusmokrassar.TelegramBotAPI.bot.exceptions.RequestException + */ suspend fun execute(request: Request): T } \ No newline at end of file diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/UpdatesPoller.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/UpdatesPoller.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/UpdatesPoller.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/UpdatesPoller.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/exceptions/RequestException.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/exceptions/RequestException.kt similarity index 94% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/exceptions/RequestException.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/exceptions/RequestException.kt index 0176512f7e..6cdcbfcd34 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/exceptions/RequestException.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/exceptions/RequestException.kt @@ -1,7 +1,7 @@ package com.github.insanusmokrassar.TelegramBotAPI.bot.exceptions import com.github.insanusmokrassar.TelegramBotAPI.types.Response -import java.io.IOException +import kotlinx.io.errors.IOException fun newRequestException( response: Response, @@ -20,7 +20,7 @@ sealed class RequestException constructor( message: String? = null, cause: Throwable? = null ) : IOException( - message, + message ?: "Something went wrong", cause ) diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/settings/ProxySettings.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/settings/ProxySettings.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/settings/ProxySettings.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/settings/ProxySettings.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/settings/limiters/CommonLimiter.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/settings/limiters/CommonLimiter.kt similarity index 96% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/settings/limiters/CommonLimiter.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/settings/limiters/CommonLimiter.kt index e053a48294..c148c333e5 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/settings/limiters/CommonLimiter.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/settings/limiters/CommonLimiter.kt @@ -1,9 +1,10 @@ package com.github.insanusmokrassar.TelegramBotAPI.bot.settings.limiters +import com.soywiz.klock.DateTime import kotlinx.coroutines.* import kotlinx.coroutines.channels.Channel -private fun now(): Long = System.currentTimeMillis() +private fun now(): Long = DateTime.nowUnixLong() class CommonLimiter( private val lockCount: Int = 10, diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/settings/limiters/EmptyLimiter.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/settings/limiters/EmptyLimiter.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/settings/limiters/EmptyLimiter.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/settings/limiters/EmptyLimiter.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/settings/limiters/PowLimiter.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/settings/limiters/PowLimiter.kt similarity index 89% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/settings/limiters/PowLimiter.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/settings/limiters/PowLimiter.kt index dfe8e76299..5a7f97c950 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/settings/limiters/PowLimiter.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/settings/limiters/PowLimiter.kt @@ -4,8 +4,8 @@ import kotlinx.coroutines.* import kotlinx.coroutines.channels.Channel import kotlinx.serialization.Serializable import kotlinx.serialization.Transient -import java.util.concurrent.Executors import kotlin.coroutines.* +import kotlin.math.pow private sealed class RequestEvent private class AddRequest( @@ -21,9 +21,7 @@ data class PowLimiter( private val powK: Double = 0.0016 ) : RequestLimiter { @Transient - private val scope = CoroutineScope( - Executors.newFixedThreadPool(3).asCoroutineDispatcher() - ) + private val scope = CoroutineScope(Dispatchers.Default) @Transient private val eventsChannel = Channel(Channel.UNLIMITED) @Transient @@ -35,7 +33,7 @@ data class PowLimiter( for (event in eventsChannel) { when (event) { is AddRequest -> { - val awaitTime = ((Math.pow(requestsInWork, powValue) * powK) * 1000L).toLong() + val awaitTime = (((requestsInWork.pow(powValue) * powK) * 1000L).toLong()) requestsInWork++ event.continuation.resume( diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/settings/limiters/RequestLimiter.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/settings/limiters/RequestLimiter.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/settings/limiters/RequestLimiter.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/settings/limiters/RequestLimiter.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/DeleteMessage.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/DeleteMessage.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/DeleteMessage.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/DeleteMessage.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/ForwardMessage.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/ForwardMessage.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/ForwardMessage.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/ForwardMessage.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/GetMe.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/GetMe.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/GetMe.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/GetMe.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/GetUpdates.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/GetUpdates.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/GetUpdates.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/GetUpdates.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/StopPoll.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/StopPoll.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/StopPoll.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/StopPoll.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/abstracts/InputFile.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/abstracts/InputFile.kt similarity index 93% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/abstracts/InputFile.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/abstracts/InputFile.kt index 8b70d3d154..2c5fbd5b94 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/abstracts/InputFile.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/abstracts/InputFile.kt @@ -3,7 +3,6 @@ package com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts import com.github.insanusmokrassar.TelegramBotAPI.utils.StorageFile import kotlinx.serialization.* import kotlinx.serialization.internal.StringDescriptor -import java.io.File @Serializable(InputFileSerializer::class) sealed class InputFile { @@ -40,7 +39,3 @@ data class MultipartFile ( ) : InputFile() { override val fileId: String = file.generateCustomName() } - -fun File.toInputFile(): InputFile = MultipartFile( - StorageFile(this) -) diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/abstracts/MultipartRequest.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/abstracts/MultipartRequest.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/abstracts/MultipartRequest.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/abstracts/MultipartRequest.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/abstracts/Request.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/abstracts/Request.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/abstracts/Request.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/abstracts/Request.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/abstracts/SimpleRequest.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/abstracts/SimpleRequest.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/abstracts/SimpleRequest.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/abstracts/SimpleRequest.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/answers/AnswerCallbackQuery.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/answers/AnswerCallbackQuery.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/answers/AnswerCallbackQuery.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/answers/AnswerCallbackQuery.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/answers/AnswerInlineQuery.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/answers/AnswerInlineQuery.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/answers/AnswerInlineQuery.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/answers/AnswerInlineQuery.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/answers/payments/AnswerPreCheckoutQuery.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/answers/payments/AnswerPreCheckoutQuery.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/answers/payments/AnswerPreCheckoutQuery.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/answers/payments/AnswerPreCheckoutQuery.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/answers/payments/AnswerShippingQuery.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/answers/payments/AnswerShippingQuery.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/answers/payments/AnswerShippingQuery.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/answers/payments/AnswerShippingQuery.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/answers/payments/abstracts/AnswerPreCheckoutQuery.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/answers/payments/abstracts/AnswerPreCheckoutQuery.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/answers/payments/abstracts/AnswerPreCheckoutQuery.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/answers/payments/abstracts/AnswerPreCheckoutQuery.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/answers/payments/abstracts/AnswerShippingQuery.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/answers/payments/abstracts/AnswerShippingQuery.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/answers/payments/abstracts/AnswerShippingQuery.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/answers/payments/abstracts/AnswerShippingQuery.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/ExportChatInviteLink.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/ExportChatInviteLink.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/ExportChatInviteLink.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/ExportChatInviteLink.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/LeaveChat.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/LeaveChat.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/LeaveChat.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/LeaveChat.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/UnpinChatMessage.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/UnpinChatMessage.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/UnpinChatMessage.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/UnpinChatMessage.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/abstracts/ChatMemberRequest.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/abstracts/ChatMemberRequest.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/abstracts/ChatMemberRequest.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/abstracts/ChatMemberRequest.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/get/GetChat.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/get/GetChat.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/get/GetChat.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/get/GetChat.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/get/GetChatAdministrators.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/get/GetChatAdministrators.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/get/GetChatAdministrators.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/get/GetChatAdministrators.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/get/GetChatMembersCount.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/get/GetChatMembersCount.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/get/GetChatMembersCount.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/get/GetChatMembersCount.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/members/GetChatMember.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/members/GetChatMember.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/members/GetChatMember.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/members/GetChatMember.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/members/KickChatMember.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/members/KickChatMember.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/members/KickChatMember.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/members/KickChatMember.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/members/PromoteChatMember.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/members/PromoteChatMember.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/members/PromoteChatMember.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/members/PromoteChatMember.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/members/RestrictChatMember.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/members/RestrictChatMember.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/members/RestrictChatMember.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/members/RestrictChatMember.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/members/UnbanChatMember.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/members/UnbanChatMember.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/members/UnbanChatMember.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/members/UnbanChatMember.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/DeleteChatPhoto.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/DeleteChatPhoto.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/DeleteChatPhoto.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/DeleteChatPhoto.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/PinChatMessage.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/PinChatMessage.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/PinChatMessage.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/PinChatMessage.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/SetChatDescription.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/SetChatDescription.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/SetChatDescription.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/SetChatDescription.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/SetChatPermissions.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/SetChatPermissions.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/SetChatPermissions.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/SetChatPermissions.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/SetChatPhoto.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/SetChatPhoto.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/SetChatPhoto.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/SetChatPhoto.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/SetChatTitle.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/SetChatTitle.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/SetChatTitle.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/SetChatTitle.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/UnpinChatMessage.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/UnpinChatMessage.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/UnpinChatMessage.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/UnpinChatMessage.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/stickers/DeleteChatStickerSet.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/stickers/DeleteChatStickerSet.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/stickers/DeleteChatStickerSet.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/stickers/DeleteChatStickerSet.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/stickers/SetChatStickerSet.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/stickers/SetChatStickerSet.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/stickers/SetChatStickerSet.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/stickers/SetChatStickerSet.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/common/CommonMultipartFileRequest.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/common/CommonMultipartFileRequest.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/common/CommonMultipartFileRequest.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/common/CommonMultipartFileRequest.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/LiveLocation/EditChatMessageLiveLocation.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/LiveLocation/EditChatMessageLiveLocation.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/LiveLocation/EditChatMessageLiveLocation.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/LiveLocation/EditChatMessageLiveLocation.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/LiveLocation/EditInlineMessageLiveLocation.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/LiveLocation/EditInlineMessageLiveLocation.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/LiveLocation/EditInlineMessageLiveLocation.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/LiveLocation/EditInlineMessageLiveLocation.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/LiveLocation/StopChatMessageLiveLocation.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/LiveLocation/StopChatMessageLiveLocation.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/LiveLocation/StopChatMessageLiveLocation.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/LiveLocation/StopChatMessageLiveLocation.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/LiveLocation/StopInlineMessageLiveLocation.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/LiveLocation/StopInlineMessageLiveLocation.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/LiveLocation/StopInlineMessageLiveLocation.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/LiveLocation/StopInlineMessageLiveLocation.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/ReplyMarkup/EditChatMessageReplyMarkup.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/ReplyMarkup/EditChatMessageReplyMarkup.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/ReplyMarkup/EditChatMessageReplyMarkup.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/ReplyMarkup/EditChatMessageReplyMarkup.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/ReplyMarkup/EditInlineMessageReplyMarkup.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/ReplyMarkup/EditInlineMessageReplyMarkup.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/ReplyMarkup/EditInlineMessageReplyMarkup.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/ReplyMarkup/EditInlineMessageReplyMarkup.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/abstracts/EditChatMessage.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/abstracts/EditChatMessage.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/abstracts/EditChatMessage.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/abstracts/EditChatMessage.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/abstracts/EditDisableWebPagePreviewMessage.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/abstracts/EditDisableWebPagePreviewMessage.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/abstracts/EditDisableWebPagePreviewMessage.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/abstracts/EditDisableWebPagePreviewMessage.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/abstracts/EditInlineMessage.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/abstracts/EditInlineMessage.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/abstracts/EditInlineMessage.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/abstracts/EditInlineMessage.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/abstracts/EditLocationMessage.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/abstracts/EditLocationMessage.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/abstracts/EditLocationMessage.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/abstracts/EditLocationMessage.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/abstracts/EditMediaMessage.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/abstracts/EditMediaMessage.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/abstracts/EditMediaMessage.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/abstracts/EditMediaMessage.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/abstracts/EditReplyMessage.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/abstracts/EditReplyMessage.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/abstracts/EditReplyMessage.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/abstracts/EditReplyMessage.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/abstracts/EditTextChatMessage.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/abstracts/EditTextChatMessage.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/abstracts/EditTextChatMessage.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/abstracts/EditTextChatMessage.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/caption/EditChatMessageCaption.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/caption/EditChatMessageCaption.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/caption/EditChatMessageCaption.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/caption/EditChatMessageCaption.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/caption/EditInlineMessageCaption.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/caption/EditInlineMessageCaption.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/caption/EditInlineMessageCaption.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/caption/EditInlineMessageCaption.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/media/EditChatMessageMedia.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/media/EditChatMessageMedia.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/media/EditChatMessageMedia.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/media/EditChatMessageMedia.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/media/EditInlineMessageMedia.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/media/EditInlineMessageMedia.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/media/EditInlineMessageMedia.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/media/EditInlineMessageMedia.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/text/EditChatMessageText.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/text/EditChatMessageText.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/text/EditChatMessageText.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/text/EditChatMessageText.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/text/EditInlineMessageText.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/text/EditInlineMessageText.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/text/EditInlineMessageText.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/edit/text/EditInlineMessageText.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/games/GetGameHighScoresByChat.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/games/GetGameHighScoresByChat.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/games/GetGameHighScoresByChat.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/games/GetGameHighScoresByChat.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/games/GetGameHighScoresByInlineMessageId.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/games/GetGameHighScoresByInlineMessageId.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/games/GetGameHighScoresByInlineMessageId.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/games/GetGameHighScoresByInlineMessageId.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/games/SetGameScoreByChatId.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/games/SetGameScoreByChatId.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/games/SetGameScoreByChatId.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/games/SetGameScoreByChatId.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/games/SetGameScoreByInlineMessageId.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/games/SetGameScoreByInlineMessageId.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/games/SetGameScoreByInlineMessageId.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/games/SetGameScoreByInlineMessageId.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/games/abstracts/GetGameHighScores.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/games/abstracts/GetGameHighScores.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/games/abstracts/GetGameHighScores.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/games/abstracts/GetGameHighScores.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/games/abstracts/SetGameScore.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/games/abstracts/SetGameScore.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/games/abstracts/SetGameScore.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/games/abstracts/SetGameScore.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/get/GetFile.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/get/GetFile.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/get/GetFile.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/get/GetFile.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/get/GetStickerSet.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/get/GetStickerSet.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/get/GetStickerSet.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/get/GetStickerSet.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/get/GetUserProfilePhotos.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/get/GetUserProfilePhotos.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/get/GetUserProfilePhotos.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/get/GetUserProfilePhotos.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/SendAction.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/SendAction.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/SendAction.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/SendAction.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/SendContact.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/SendContact.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/SendContact.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/SendContact.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/SendLocation.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/SendLocation.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/SendLocation.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/SendLocation.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/SendMessage.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/SendMessage.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/SendMessage.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/SendMessage.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/SendPoll.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/SendPoll.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/SendPoll.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/SendPoll.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/SendVenue.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/SendVenue.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/SendVenue.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/SendVenue.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/abstracts/DuratedSendMessageRequest.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/abstracts/DuratedSendMessageRequest.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/abstracts/DuratedSendMessageRequest.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/abstracts/DuratedSendMessageRequest.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/abstracts/PositionedSendMessageRequest.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/abstracts/PositionedSendMessageRequest.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/abstracts/PositionedSendMessageRequest.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/abstracts/PositionedSendMessageRequest.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/abstracts/ReplyingMarkupSendMessageRequest.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/abstracts/ReplyingMarkupSendMessageRequest.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/abstracts/ReplyingMarkupSendMessageRequest.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/abstracts/ReplyingMarkupSendMessageRequest.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/abstracts/SendChatMessageRequest.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/abstracts/SendChatMessageRequest.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/abstracts/SendChatMessageRequest.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/abstracts/SendChatMessageRequest.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/abstracts/SendMessageRequest.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/abstracts/SendMessageRequest.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/abstracts/SendMessageRequest.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/abstracts/SendMessageRequest.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/abstracts/SizedSendMessageRequest.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/abstracts/SizedSendMessageRequest.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/abstracts/SizedSendMessageRequest.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/abstracts/SizedSendMessageRequest.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/abstracts/TextableSendMessageRequest.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/abstracts/TextableSendMessageRequest.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/abstracts/TextableSendMessageRequest.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/abstracts/TextableSendMessageRequest.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/abstracts/ThumbedSendMessageRequest.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/abstracts/ThumbedSendMessageRequest.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/abstracts/ThumbedSendMessageRequest.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/abstracts/ThumbedSendMessageRequest.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/abstracts/TitledSendMessageRequest.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/abstracts/TitledSendMessageRequest.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/abstracts/TitledSendMessageRequest.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/abstracts/TitledSendMessageRequest.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/games/SendGame.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/games/SendGame.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/games/SendGame.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/games/SendGame.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendAnimation.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendAnimation.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendAnimation.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendAnimation.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendAudio.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendAudio.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendAudio.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendAudio.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendDocument.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendDocument.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendDocument.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendDocument.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendMediaGroup.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendMediaGroup.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendMediaGroup.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendMediaGroup.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendPhoto.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendPhoto.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendPhoto.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendPhoto.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendSticker.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendSticker.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendSticker.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendSticker.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendVideo.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendVideo.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendVideo.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendVideo.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendVideoNote.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendVideoNote.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendVideoNote.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendVideoNote.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendVoice.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendVoice.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendVoice.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendVoice.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/base/DataRequest.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/base/DataRequest.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/base/DataRequest.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/base/DataRequest.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/base/Files.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/base/Files.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/base/Files.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/base/Files.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/base/MultipartRequestImpl.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/base/MultipartRequestImpl.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/base/MultipartRequestImpl.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/base/MultipartRequestImpl.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/payments/SendInvoice.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/payments/SendInvoice.kt similarity index 98% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/payments/SendInvoice.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/payments/SendInvoice.kt index 7ee480035d..768ddc322f 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/payments/SendInvoice.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/payments/SendInvoice.kt @@ -10,7 +10,6 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.payments.LabeledPrice import com.github.insanusmokrassar.TelegramBotAPI.types.payments.LabeledPricesSerializer import com.github.insanusmokrassar.TelegramBotAPI.types.payments.abstracts.* import kotlinx.serialization.* -import java.util.* /** * @param providerData - JSON-ENCODED FIELD @@ -29,7 +28,6 @@ data class SendInvoice( val providerToken: String, @SerialName(startParameterField) val startParameter: StartParameter, - @Serializable(CurrencySerializer::class) @SerialName(currencyField) override val currency: Currency, @Serializable(LabeledPricesSerializer::class) diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/stickers/AddStickerToSet.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/stickers/AddStickerToSet.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/stickers/AddStickerToSet.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/stickers/AddStickerToSet.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/stickers/CreateNewStickerSet.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/stickers/CreateNewStickerSet.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/stickers/CreateNewStickerSet.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/stickers/CreateNewStickerSet.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/stickers/DeleteStickerFromSet.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/stickers/DeleteStickerFromSet.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/stickers/DeleteStickerFromSet.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/stickers/DeleteStickerFromSet.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/stickers/SetStickerPositionInSet.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/stickers/SetStickerPositionInSet.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/stickers/SetStickerPositionInSet.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/stickers/SetStickerPositionInSet.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/stickers/UploadStickerFile.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/stickers/UploadStickerFile.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/stickers/UploadStickerFile.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/stickers/UploadStickerFile.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/stickers/abstracts/StickerSetAction.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/stickers/abstracts/StickerSetAction.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/stickers/abstracts/StickerSetAction.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/stickers/abstracts/StickerSetAction.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/webhook/DeleteWebhook.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/webhook/DeleteWebhook.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/webhook/DeleteWebhook.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/webhook/DeleteWebhook.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/webhook/GetWebhookInfo.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/webhook/GetWebhookInfo.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/webhook/GetWebhookInfo.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/webhook/GetWebhookInfo.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/webhook/SetWebhook.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/webhook/SetWebhook.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/webhook/SetWebhook.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/webhook/SetWebhook.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/CallbackQuery/CallbackQuery.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/CallbackQuery/CallbackQuery.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/CallbackQuery/CallbackQuery.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/CallbackQuery/CallbackQuery.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/CallbackQuery/DataCallbackQuery.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/CallbackQuery/DataCallbackQuery.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/CallbackQuery/DataCallbackQuery.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/CallbackQuery/DataCallbackQuery.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/CallbackQuery/GameShortNameCallbackQuery.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/CallbackQuery/GameShortNameCallbackQuery.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/CallbackQuery/GameShortNameCallbackQuery.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/CallbackQuery/GameShortNameCallbackQuery.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/CallbackQuery/InlineMessageIdCallbackQuery.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/CallbackQuery/InlineMessageIdCallbackQuery.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/CallbackQuery/InlineMessageIdCallbackQuery.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/CallbackQuery/InlineMessageIdCallbackQuery.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/CallbackQuery/InlineMessageIdDataCallbackQuery.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/CallbackQuery/InlineMessageIdDataCallbackQuery.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/CallbackQuery/InlineMessageIdDataCallbackQuery.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/CallbackQuery/InlineMessageIdDataCallbackQuery.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/CallbackQuery/InlineMessageIdGameShortNameCallbackQuery.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/CallbackQuery/InlineMessageIdGameShortNameCallbackQuery.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/CallbackQuery/InlineMessageIdGameShortNameCallbackQuery.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/CallbackQuery/InlineMessageIdGameShortNameCallbackQuery.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/CallbackQuery/MessageCallbackQuery.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/CallbackQuery/MessageCallbackQuery.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/CallbackQuery/MessageCallbackQuery.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/CallbackQuery/MessageCallbackQuery.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/CallbackQuery/MessageDataCallbackQuery.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/CallbackQuery/MessageDataCallbackQuery.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/CallbackQuery/MessageDataCallbackQuery.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/CallbackQuery/MessageDataCallbackQuery.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/CallbackQuery/MessageGameShortNameCallbackQuery.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/CallbackQuery/MessageGameShortNameCallbackQuery.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/CallbackQuery/MessageGameShortNameCallbackQuery.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/CallbackQuery/MessageGameShortNameCallbackQuery.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/CallbackQuery/RawCallbackQuery.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/CallbackQuery/RawCallbackQuery.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/CallbackQuery/RawCallbackQuery.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/CallbackQuery/RawCallbackQuery.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatIdentifier.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatIdentifier.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatIdentifier.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatIdentifier.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatMember/AdministratorChatMemberImpl.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatMember/AdministratorChatMemberImpl.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatMember/AdministratorChatMemberImpl.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatMember/AdministratorChatMemberImpl.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatMember/CreatorChatMember.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatMember/CreatorChatMember.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatMember/CreatorChatMember.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatMember/CreatorChatMember.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatMember/KickedChatMember.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatMember/KickedChatMember.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatMember/KickedChatMember.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatMember/KickedChatMember.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatMember/LeftChatMember.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatMember/LeftChatMember.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatMember/LeftChatMember.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatMember/LeftChatMember.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatMember/MemberChatMember.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatMember/MemberChatMember.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatMember/MemberChatMember.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatMember/MemberChatMember.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatMember/RawChatMember.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatMember/RawChatMember.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatMember/RawChatMember.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatMember/RawChatMember.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatMember/RestrictedChatMember.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatMember/RestrictedChatMember.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatMember/RestrictedChatMember.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatMember/RestrictedChatMember.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatMember/abstracts/AdministratorChatMember.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatMember/abstracts/AdministratorChatMember.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatMember/abstracts/AdministratorChatMember.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatMember/abstracts/AdministratorChatMember.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatMember/abstracts/BannedChatMember.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatMember/abstracts/BannedChatMember.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatMember/abstracts/BannedChatMember.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatMember/abstracts/BannedChatMember.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatMember/abstracts/ChatMember.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatMember/abstracts/ChatMember.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatMember/abstracts/ChatMember.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatMember/abstracts/ChatMember.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatMember/abstracts/SpecialRightsChatMember.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatMember/abstracts/SpecialRightsChatMember.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatMember/abstracts/SpecialRightsChatMember.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatMember/abstracts/SpecialRightsChatMember.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatPhoto.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatPhoto.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatPhoto.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatPhoto.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/Common.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/Common.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/Common.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/Common.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/Contact.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/Contact.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/Contact.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/Contact.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/ChosenInlineResult/BaseChosenInlineResult.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/ChosenInlineResult/BaseChosenInlineResult.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/ChosenInlineResult/BaseChosenInlineResult.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/ChosenInlineResult/BaseChosenInlineResult.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/ChosenInlineResult/LocationChosenInlineResult.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/ChosenInlineResult/LocationChosenInlineResult.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/ChosenInlineResult/LocationChosenInlineResult.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/ChosenInlineResult/LocationChosenInlineResult.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/ChosenInlineResult/RawChosenInlineResult.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/ChosenInlineResult/RawChosenInlineResult.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/ChosenInlineResult/RawChosenInlineResult.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/ChosenInlineResult/RawChosenInlineResult.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultArticle.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultArticle.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultArticle.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultArticle.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultAudioCachedImpl.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultAudioCachedImpl.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultAudioCachedImpl.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultAudioCachedImpl.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultAudioImpl.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultAudioImpl.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultAudioImpl.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultAudioImpl.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultContact.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultContact.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultContact.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultContact.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultDocumentCachedImpl.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultDocumentCachedImpl.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultDocumentCachedImpl.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultDocumentCachedImpl.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultDocumentImpl.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultDocumentImpl.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultDocumentImpl.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultDocumentImpl.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultGame.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultGame.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultGame.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultGame.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultGifCachedImpl.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultGifCachedImpl.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultGifCachedImpl.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultGifCachedImpl.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultGifImpl.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultGifImpl.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultGifImpl.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultGifImpl.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultLocation.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultLocation.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultLocation.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultLocation.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultMpeg4GifCachedImpl.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultMpeg4GifCachedImpl.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultMpeg4GifCachedImpl.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultMpeg4GifCachedImpl.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultMpeg4GifImpl.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultMpeg4GifImpl.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultMpeg4GifImpl.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultMpeg4GifImpl.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultPhotoCachedImpl.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultPhotoCachedImpl.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultPhotoCachedImpl.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultPhotoCachedImpl.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultPhotoImpl.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultPhotoImpl.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultPhotoImpl.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultPhotoImpl.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultStickerCached.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultStickerCached.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultStickerCached.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultStickerCached.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultVenue.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultVenue.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultVenue.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultVenue.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultVideoCachedImpl.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultVideoCachedImpl.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultVideoCachedImpl.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultVideoCachedImpl.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultVideoImpl.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultVideoImpl.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultVideoImpl.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultVideoImpl.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultVoiceCachedImpl.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultVoiceCachedImpl.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultVoiceCachedImpl.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultVoiceCachedImpl.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultVoiceImpl.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultVoiceImpl.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultVoiceImpl.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultVoiceImpl.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/DescribedInlineQueryResult.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/DescribedInlineQueryResult.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/DescribedInlineQueryResult.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/DescribedInlineQueryResult.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/DuratedInlineResultQuery.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/DuratedInlineResultQuery.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/DuratedInlineResultQuery.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/DuratedInlineResultQuery.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/FileInlineQueryResult.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/FileInlineQueryResult.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/FileInlineQueryResult.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/FileInlineQueryResult.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/InlineQueryResult.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/InlineQueryResult.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/InlineQueryResult.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/InlineQueryResult.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/OptionallyTitledInlineQueryResult.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/OptionallyTitledInlineQueryResult.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/OptionallyTitledInlineQueryResult.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/OptionallyTitledInlineQueryResult.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/PositionedInlineQueryResult.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/PositionedInlineQueryResult.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/PositionedInlineQueryResult.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/PositionedInlineQueryResult.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/SizedInlineQueryResult.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/SizedInlineQueryResult.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/SizedInlineQueryResult.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/SizedInlineQueryResult.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/ThumbSizedInlineQueryResult.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/ThumbSizedInlineQueryResult.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/ThumbSizedInlineQueryResult.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/ThumbSizedInlineQueryResult.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/ThumbedInlineQueryResult.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/ThumbedInlineQueryResult.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/ThumbedInlineQueryResult.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/ThumbedInlineQueryResult.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/TitledInlineQueryResult.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/TitledInlineQueryResult.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/TitledInlineQueryResult.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/TitledInlineQueryResult.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/UrlInlineQueryResult.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/UrlInlineQueryResult.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/UrlInlineQueryResult.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/UrlInlineQueryResult.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/WithFileIdInlineQueryResult.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/WithFileIdInlineQueryResult.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/WithFileIdInlineQueryResult.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/WithFileIdInlineQueryResult.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/WithInputMessageContentInlineQueryResult.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/WithInputMessageContentInlineQueryResult.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/WithInputMessageContentInlineQueryResult.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/WithInputMessageContentInlineQueryResult.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/audio/InlineQueryResultAudio.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/audio/InlineQueryResultAudio.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/audio/InlineQueryResultAudio.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/audio/InlineQueryResultAudio.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/audio/InlineQueryResultAudioCached.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/audio/InlineQueryResultAudioCached.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/audio/InlineQueryResultAudioCached.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/audio/InlineQueryResultAudioCached.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/audio/InlineQueryResultAudioCommon.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/audio/InlineQueryResultAudioCommon.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/audio/InlineQueryResultAudioCommon.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/audio/InlineQueryResultAudioCommon.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/document/InlineQueryResultDocument.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/document/InlineQueryResultDocument.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/document/InlineQueryResultDocument.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/document/InlineQueryResultDocument.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/document/InlineQueryResultDocumentCached.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/document/InlineQueryResultDocumentCached.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/document/InlineQueryResultDocumentCached.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/document/InlineQueryResultDocumentCached.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/document/InlineQueryResultDocumentCommon.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/document/InlineQueryResultDocumentCommon.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/document/InlineQueryResultDocumentCommon.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/document/InlineQueryResultDocumentCommon.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/gif/InlineQueryResultGif.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/gif/InlineQueryResultGif.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/gif/InlineQueryResultGif.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/gif/InlineQueryResultGif.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/gif/InlineQueryResultGifCached.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/gif/InlineQueryResultGifCached.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/gif/InlineQueryResultGifCached.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/gif/InlineQueryResultGifCached.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/gif/InlineQueryResultGifCommon.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/gif/InlineQueryResultGifCommon.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/gif/InlineQueryResultGifCommon.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/gif/InlineQueryResultGifCommon.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/mpeg4gif/InlineQueryResultMpeg4Gif.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/mpeg4gif/InlineQueryResultMpeg4Gif.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/mpeg4gif/InlineQueryResultMpeg4Gif.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/mpeg4gif/InlineQueryResultMpeg4Gif.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/mpeg4gif/InlineQueryResultMpeg4GifCached.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/mpeg4gif/InlineQueryResultMpeg4GifCached.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/mpeg4gif/InlineQueryResultMpeg4GifCached.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/mpeg4gif/InlineQueryResultMpeg4GifCached.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/mpeg4gif/InlineQueryResultMpeg4GifCommon.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/mpeg4gif/InlineQueryResultMpeg4GifCommon.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/mpeg4gif/InlineQueryResultMpeg4GifCommon.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/mpeg4gif/InlineQueryResultMpeg4GifCommon.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/photo/InlineQueryResultPhoto.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/photo/InlineQueryResultPhoto.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/photo/InlineQueryResultPhoto.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/photo/InlineQueryResultPhoto.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/photo/InlineQueryResultPhotoCached.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/photo/InlineQueryResultPhotoCached.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/photo/InlineQueryResultPhotoCached.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/photo/InlineQueryResultPhotoCached.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/photo/InlineQueryResultPhotoCommon.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/photo/InlineQueryResultPhotoCommon.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/photo/InlineQueryResultPhotoCommon.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/photo/InlineQueryResultPhotoCommon.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/video/InlineQueryResultVideo.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/video/InlineQueryResultVideo.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/video/InlineQueryResultVideo.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/video/InlineQueryResultVideo.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/video/InlineQueryResultVideoCached.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/video/InlineQueryResultVideoCached.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/video/InlineQueryResultVideoCached.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/video/InlineQueryResultVideoCached.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/video/InlineQueryResultVideoCommon.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/video/InlineQueryResultVideoCommon.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/video/InlineQueryResultVideoCommon.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/video/InlineQueryResultVideoCommon.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/voice/InlineQueryResultVoice.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/voice/InlineQueryResultVoice.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/voice/InlineQueryResultVoice.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/voice/InlineQueryResultVoice.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/voice/InlineQueryResultVoiceCached.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/voice/InlineQueryResultVoiceCached.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/voice/InlineQueryResultVoiceCached.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/voice/InlineQueryResultVoiceCached.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/voice/InlineQueryResultVoiceCommon.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/voice/InlineQueryResultVoiceCommon.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/voice/InlineQueryResultVoiceCommon.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/voice/InlineQueryResultVoiceCommon.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/serializers/InlineQueryResultSerializer.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/serializers/InlineQueryResultSerializer.kt similarity index 96% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/serializers/InlineQueryResultSerializer.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/serializers/InlineQueryResultSerializer.kt index 2e6e9736ff..8b346927a9 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/serializers/InlineQueryResultSerializer.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/serializers/InlineQueryResultSerializer.kt @@ -4,7 +4,6 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQuer import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.InlineQueryResult import kotlinx.serialization.* import kotlinx.serialization.internal.StringDescriptor -import sun.reflect.generics.reflectiveObjects.NotImplementedException @Serializer(InlineQueryResult::class) object InlineQueryResultSerializer : KSerializer { @@ -35,6 +34,6 @@ object InlineQueryResultSerializer : KSerializer { } override fun deserialize(decoder: Decoder): InlineQueryResult { - throw NotImplementedException() + throw TODO() } } \ No newline at end of file diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InputMessageContent/InputContactMessageContent.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InputMessageContent/InputContactMessageContent.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InputMessageContent/InputContactMessageContent.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InputMessageContent/InputContactMessageContent.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InputMessageContent/InputLocationMessageContent.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InputMessageContent/InputLocationMessageContent.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InputMessageContent/InputLocationMessageContent.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InputMessageContent/InputLocationMessageContent.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InputMessageContent/InputTextMessageContent.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InputMessageContent/InputTextMessageContent.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InputMessageContent/InputTextMessageContent.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InputMessageContent/InputTextMessageContent.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InputMessageContent/InputVenueMessageContent.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InputMessageContent/InputVenueMessageContent.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InputMessageContent/InputVenueMessageContent.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InputMessageContent/InputVenueMessageContent.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InputMessageContentSerializer.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InputMessageContentSerializer.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InputMessageContentSerializer.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InputMessageContentSerializer.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/abstracts/ChosenInlineResult.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/abstracts/ChosenInlineResult.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/abstracts/ChosenInlineResult.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/abstracts/ChosenInlineResult.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/abstracts/InlineQuery.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/abstracts/InlineQuery.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/abstracts/InlineQuery.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/abstracts/InlineQuery.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/abstracts/InputMessageContent.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/abstracts/InputMessageContent.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/abstracts/InputMessageContent.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/abstracts/InputMessageContent.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/query/BaseInlineQuery.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/query/BaseInlineQuery.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/query/BaseInlineQuery.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/query/BaseInlineQuery.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/query/LocationInlineQuery.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/query/LocationInlineQuery.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/query/LocationInlineQuery.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/query/LocationInlineQuery.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/query/RawInlineQuery.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/query/RawInlineQuery.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/query/RawInlineQuery.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/query/RawInlineQuery.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/DuratedInputMedia.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/DuratedInputMedia.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/DuratedInputMedia.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/DuratedInputMedia.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/InputMedia.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/InputMedia.kt similarity index 82% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/InputMedia.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/InputMedia.kt index 41ec671ded..800795a2db 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/InputMedia.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/InputMedia.kt @@ -3,7 +3,7 @@ package com.github.insanusmokrassar.TelegramBotAPI.types.InputMedia import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.InputFile import kotlinx.serialization.Serializable -const val inputMediaFileAttachmentNameTemplate = "attach://%s" +fun String.toInputMediaFileAttachmentName() = "attach://$this" @Serializable(InputMediaSerializer::class) interface InputMedia { diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/InputMediaAnimation.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/InputMediaAnimation.kt similarity index 92% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/InputMediaAnimation.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/InputMediaAnimation.kt index 8ce52cad55..1fb4cfdbbf 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/InputMediaAnimation.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/InputMediaAnimation.kt @@ -26,7 +26,7 @@ data class InputMediaAnimation( get() = file.let { when (it) { is FileId -> it.fileId - is MultipartFile -> inputMediaFileAttachmentNameTemplate.format(it.fileId) + is MultipartFile -> it.fileId.toInputMediaFileAttachmentName() } } } diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/InputMediaAudio.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/InputMediaAudio.kt similarity index 93% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/InputMediaAudio.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/InputMediaAudio.kt index cf5d2f2125..c63592243c 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/InputMediaAudio.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/InputMediaAudio.kt @@ -27,7 +27,7 @@ data class InputMediaAudio( get() = file.let { when (it) { is FileId -> it.fileId - is MultipartFile -> inputMediaFileAttachmentNameTemplate.format(it.fileId) + is MultipartFile -> it.fileId.toInputMediaFileAttachmentName() } } } diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/InputMediaDocument.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/InputMediaDocument.kt similarity index 91% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/InputMediaDocument.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/InputMediaDocument.kt index 2c27daca2f..38cd9ac283 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/InputMediaDocument.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/InputMediaDocument.kt @@ -23,7 +23,7 @@ data class InputMediaDocument( get() = file.let { when (it) { is FileId -> it.fileId - is MultipartFile -> inputMediaFileAttachmentNameTemplate.format(it.fileId) + is MultipartFile -> it.fileId.toInputMediaFileAttachmentName() } } } diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/InputMediaPhoto.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/InputMediaPhoto.kt similarity index 93% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/InputMediaPhoto.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/InputMediaPhoto.kt index da05c99286..2e5ea13d13 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/InputMediaPhoto.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/InputMediaPhoto.kt @@ -21,7 +21,7 @@ data class InputMediaPhoto( @SerialName(mediaField) val media: String = when (file) { is FileId -> file.fileId - is MultipartFile -> inputMediaFileAttachmentNameTemplate.format(file.fileId) + is MultipartFile -> file.fileId.toInputMediaFileAttachmentName() } @Transient diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/InputMediaSerializer.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/InputMediaSerializer.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/InputMediaSerializer.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/InputMediaSerializer.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/InputMediaVideo.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/InputMediaVideo.kt similarity index 93% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/InputMediaVideo.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/InputMediaVideo.kt index 21bfa5df21..faf5a15f3c 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/InputMediaVideo.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/InputMediaVideo.kt @@ -24,7 +24,7 @@ data class InputMediaVideo( @SerialName(mediaField) val media: String = when (file) { is FileId -> file.fileId - is MultipartFile -> inputMediaFileAttachmentNameTemplate.format(file.fileId) + is MultipartFile -> file.fileId.toInputMediaFileAttachmentName() } @Transient diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/MediaGroupMemberInputMedia.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/MediaGroupMemberInputMedia.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/MediaGroupMemberInputMedia.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/MediaGroupMemberInputMedia.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/MediaGroupMemberInputMediaSerializer.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/MediaGroupMemberInputMediaSerializer.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/MediaGroupMemberInputMediaSerializer.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/MediaGroupMemberInputMediaSerializer.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/SizedInputMedia.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/SizedInputMedia.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/SizedInputMedia.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/SizedInputMedia.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/ThumbedInputMedia.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/ThumbedInputMedia.kt similarity index 86% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/ThumbedInputMedia.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/ThumbedInputMedia.kt index 69f24997c9..c94e1c430f 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/ThumbedInputMedia.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/ThumbedInputMedia.kt @@ -14,7 +14,7 @@ interface ThumbedInputMedia : InputMedia { get() = thumb ?.let { when (it) { is FileId -> it.fileId - is MultipartFile -> inputMediaFileAttachmentNameTemplate.format(it.fileId) + is MultipartFile -> it.fileId.toInputMediaFileAttachmentName() } } } diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/TitledInputMedia.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/TitledInputMedia.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/TitledInputMedia.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/TitledInputMedia.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/Location.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/Location.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/Location.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/Location.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/LoginURL.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/LoginURL.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/LoginURL.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/LoginURL.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/BoldTextMessageEntity.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/BoldTextMessageEntity.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/BoldTextMessageEntity.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/BoldTextMessageEntity.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/BotCommandMessageEntity.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/BotCommandMessageEntity.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/BotCommandMessageEntity.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/BotCommandMessageEntity.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/CodeTextMessageEntity.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/CodeTextMessageEntity.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/CodeTextMessageEntity.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/CodeTextMessageEntity.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/EMailMessageEntity.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/EMailMessageEntity.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/EMailMessageEntity.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/EMailMessageEntity.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/HashTagMessageEntity.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/HashTagMessageEntity.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/HashTagMessageEntity.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/HashTagMessageEntity.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/ItalicTextMessageEntity.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/ItalicTextMessageEntity.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/ItalicTextMessageEntity.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/ItalicTextMessageEntity.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/MentionMessageEntity.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/MentionMessageEntity.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/MentionMessageEntity.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/MentionMessageEntity.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/MessageEntity.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/MessageEntity.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/MessageEntity.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/MessageEntity.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/PhoneNumberMessageEntity.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/PhoneNumberMessageEntity.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/PhoneNumberMessageEntity.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/PhoneNumberMessageEntity.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/PreTextMessageEntity.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/PreTextMessageEntity.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/PreTextMessageEntity.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/PreTextMessageEntity.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/RawMessageEntity.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/RawMessageEntity.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/RawMessageEntity.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/RawMessageEntity.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/RegularTextMessageEntity.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/RegularTextMessageEntity.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/RegularTextMessageEntity.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/RegularTextMessageEntity.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/TextLinkMessageEntity.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/TextLinkMessageEntity.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/TextLinkMessageEntity.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/TextLinkMessageEntity.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/TextMentionMessageEntity.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/TextMentionMessageEntity.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/TextMentionMessageEntity.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/TextMentionMessageEntity.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/URLMessageEntity.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/URLMessageEntity.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/URLMessageEntity.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/URLMessageEntity.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ParseMode/ParseMode.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ParseMode/ParseMode.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ParseMode/ParseMode.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ParseMode/ParseMode.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/RequestError.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/RequestError.kt similarity index 62% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/RequestError.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/RequestError.kt index 4579ed914f..f5ad67adad 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/RequestError.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/RequestError.kt @@ -1,6 +1,6 @@ package com.github.insanusmokrassar.TelegramBotAPI.types -import java.util.concurrent.TimeUnit +import com.soywiz.klock.DateTime sealed class RequestError @@ -8,9 +8,9 @@ data class RetryAfterError( val seconds: Long, val startCountingMillis: Long ) : RequestError() { - val canContinue = TimeUnit.SECONDS.toMillis(seconds) + startCountingMillis + val canContinue = (seconds * 1000L) + startCountingMillis val leftToRetry: Long - get() = canContinue - System.currentTimeMillis() + get() = canContinue - DateTime.nowUnixLong() } data class MigrateChatId( diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/Response.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/Response.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/Response.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/Response.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ResponseParametersRaw.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ResponseParametersRaw.kt similarity index 85% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ResponseParametersRaw.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ResponseParametersRaw.kt index 666034e4da..5934831b72 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ResponseParametersRaw.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ResponseParametersRaw.kt @@ -1,5 +1,6 @@ package com.github.insanusmokrassar.TelegramBotAPI.types +import com.soywiz.klock.DateTime import kotlinx.serialization.* @Serializable @@ -10,7 +11,7 @@ data class ResponseParametersRaw( private val retryAfter: Long? = null ) { @Transient - private val createTime: Long = System.currentTimeMillis() + private val createTime: Long = DateTime.now().unixMillisLong val error: RequestError? by lazy { when { migrateToChatId != null -> MigrateChatId(migrateToChatId); diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/TelegramDate.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/TelegramDate.kt similarity index 74% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/TelegramDate.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/TelegramDate.kt index ff71a73f73..1527379a4a 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/TelegramDate.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/TelegramDate.kt @@ -1,23 +1,22 @@ package com.github.insanusmokrassar.TelegramBotAPI.types import kotlinx.serialization.* -import org.joda.time.DateTime -import java.util.concurrent.TimeUnit +import com.soywiz.klock.DateTime @Serializable(TelegramDateSerializer::class) data class TelegramDate( /** * Contains UNIX time (seconds) */ - private val date: Long + internal val date: Long ) { constructor(dateTime: DateTime) : this( - TimeUnit.MILLISECONDS.toSeconds(dateTime.millis) + dateTime.unixMillisLong / 1000 ) @Transient val asDate: DateTime = DateTime( - TimeUnit.SECONDS.toMillis(date) + date * 1000 ) } @@ -27,7 +26,7 @@ fun DateTime.toTelegramDate(): TelegramDate = TelegramDate(this) internal object TelegramDateSerializer : KSerializer { override fun serialize(encoder: Encoder, obj: TelegramDate) { encoder.encodeLong( - TimeUnit.MILLISECONDS.toSeconds(obj.asDate.millis) + obj.date ) } diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/UpdateTypes.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/UpdateTypes.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/UpdateTypes.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/UpdateTypes.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/User.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/User.kt similarity index 69% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/User.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/User.kt index 734dc61b5d..2de79a6b18 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/User.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/User.kt @@ -1,7 +1,6 @@ package com.github.insanusmokrassar.TelegramBotAPI.types import kotlinx.serialization.* -import java.util.* @Serializable data class User( @@ -15,11 +14,5 @@ data class User( @SerialName(usernameField) val username: Username? = null, @SerialName(languageCodeField) - private val languageCode: String? = null -) { - val userLocale: Locale? by lazy { - languageCode ?.let { - Locale.forLanguageTag(it) - } - } -} + val languageCode: String? = null +) diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/UserProfilePhotos.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/UserProfilePhotos.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/UserProfilePhotos.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/UserProfilePhotos.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/Venue.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/Venue.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/Venue.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/Venue.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/WebhookInfo.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/WebhookInfo.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/WebhookInfo.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/WebhookInfo.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/actions/BotAction.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/actions/BotAction.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/actions/BotAction.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/actions/BotAction.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/Common.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/Common.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/Common.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/Common.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/ForceReply.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/ForceReply.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/ForceReply.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/ForceReply.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/InlineKeyboardButtons/InlineKeyboardButton.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/InlineKeyboardButtons/InlineKeyboardButton.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/InlineKeyboardButtons/InlineKeyboardButton.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/InlineKeyboardButtons/InlineKeyboardButton.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/InlineKeyboardButtons/InlineKeyboardButtonSerializer.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/InlineKeyboardButtons/InlineKeyboardButtonSerializer.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/InlineKeyboardButtons/InlineKeyboardButtonSerializer.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/InlineKeyboardButtons/InlineKeyboardButtonSerializer.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/InlineKeyboardMarkup.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/InlineKeyboardMarkup.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/InlineKeyboardMarkup.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/InlineKeyboardMarkup.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/KeyboardButton.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/KeyboardButton.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/KeyboardButton.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/KeyboardButton.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/KeyboardMarkup.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/KeyboardMarkup.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/KeyboardMarkup.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/KeyboardMarkup.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/KeyboardMarkupSerializer.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/KeyboardMarkupSerializer.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/KeyboardMarkupSerializer.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/KeyboardMarkupSerializer.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/ReplyKeyboardMarkup.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/ReplyKeyboardMarkup.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/ReplyKeyboardMarkup.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/ReplyKeyboardMarkup.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/ReplyKeyboardRemove.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/ReplyKeyboardRemove.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/ReplyKeyboardRemove.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/ReplyKeyboardRemove.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/ChannelChatImpl.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/ChannelChatImpl.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/ChannelChatImpl.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/ChannelChatImpl.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/ChatPermissions.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/ChatPermissions.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/ChatPermissions.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/ChatPermissions.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/ChatSerializers.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/ChatSerializers.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/ChatSerializers.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/ChatSerializers.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/GroupChatImpl.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/GroupChatImpl.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/GroupChatImpl.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/GroupChatImpl.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/PrivateChatImpl.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/PrivateChatImpl.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/PrivateChatImpl.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/PrivateChatImpl.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/SupergroupChatImpl.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/SupergroupChatImpl.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/SupergroupChatImpl.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/SupergroupChatImpl.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/abstracts/ChannelChat.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/abstracts/ChannelChat.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/abstracts/ChannelChat.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/abstracts/ChannelChat.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/abstracts/Chat.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/abstracts/Chat.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/abstracts/Chat.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/abstracts/Chat.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/abstracts/GroupChat.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/abstracts/GroupChat.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/abstracts/GroupChat.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/abstracts/GroupChat.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/abstracts/PrivateChat.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/abstracts/PrivateChat.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/abstracts/PrivateChat.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/abstracts/PrivateChat.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/abstracts/PublicChat.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/abstracts/PublicChat.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/abstracts/PublicChat.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/abstracts/PublicChat.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/abstracts/SuperPublicChat.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/abstracts/SuperPublicChat.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/abstracts/SuperPublicChat.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/abstracts/SuperPublicChat.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/abstracts/SupergroupChat.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/abstracts/SupergroupChat.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/abstracts/SupergroupChat.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/abstracts/SupergroupChat.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/abstracts/UsernameChat.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/abstracts/UsernameChat.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/abstracts/UsernameChat.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/abstracts/UsernameChat.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/abstracts/extended/ExtendedChannelChat.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/abstracts/extended/ExtendedChannelChat.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/abstracts/extended/ExtendedChannelChat.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/abstracts/extended/ExtendedChannelChat.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/abstracts/extended/ExtendedChat.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/abstracts/extended/ExtendedChat.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/abstracts/extended/ExtendedChat.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/abstracts/extended/ExtendedChat.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/abstracts/extended/ExtendedGroupChat.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/abstracts/extended/ExtendedGroupChat.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/abstracts/extended/ExtendedGroupChat.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/abstracts/extended/ExtendedGroupChat.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/abstracts/extended/ExtendedPrivateChat.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/abstracts/extended/ExtendedPrivateChat.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/abstracts/extended/ExtendedPrivateChat.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/abstracts/extended/ExtendedPrivateChat.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/abstracts/extended/ExtendedPublicChat.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/abstracts/extended/ExtendedPublicChat.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/abstracts/extended/ExtendedPublicChat.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/abstracts/extended/ExtendedPublicChat.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/abstracts/extended/ExtendedSupergroupChat.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/abstracts/extended/ExtendedSupergroupChat.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/abstracts/extended/ExtendedSupergroupChat.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/abstracts/extended/ExtendedSupergroupChat.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/extended/ExtendedChannelChatImpl.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/extended/ExtendedChannelChatImpl.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/extended/ExtendedChannelChatImpl.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/extended/ExtendedChannelChatImpl.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/extended/ExtendedGroupChatImpl.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/extended/ExtendedGroupChatImpl.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/extended/ExtendedGroupChatImpl.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/extended/ExtendedGroupChatImpl.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/extended/ExtendedPrivateChatImpl.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/extended/ExtendedPrivateChatImpl.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/extended/ExtendedPrivateChatImpl.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/extended/ExtendedPrivateChatImpl.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/extended/ExtendedSupergroupChatImpl.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/extended/ExtendedSupergroupChatImpl.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/extended/ExtendedSupergroupChatImpl.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/chat/extended/ExtendedSupergroupChatImpl.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/AnimationFile.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/AnimationFile.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/AnimationFile.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/AnimationFile.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/AudioFile.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/AudioFile.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/AudioFile.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/AudioFile.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/DocumentFile.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/DocumentFile.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/DocumentFile.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/DocumentFile.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/File.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/File.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/File.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/File.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/PathedFile.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/PathedFile.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/PathedFile.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/PathedFile.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/PhotoSize.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/PhotoSize.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/PhotoSize.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/PhotoSize.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/Sticker.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/Sticker.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/Sticker.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/Sticker.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/VideoFile.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/VideoFile.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/VideoFile.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/VideoFile.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/VideoNoteFile.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/VideoNoteFile.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/VideoNoteFile.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/VideoNoteFile.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/VoiceFile.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/VoiceFile.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/VoiceFile.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/VoiceFile.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/abstracts/CustomNamedMediaFile.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/abstracts/CustomNamedMediaFile.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/abstracts/CustomNamedMediaFile.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/abstracts/CustomNamedMediaFile.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/abstracts/MimedMediaFile.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/abstracts/MimedMediaFile.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/abstracts/MimedMediaFile.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/abstracts/MimedMediaFile.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/abstracts/PlayableMediaFile.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/abstracts/PlayableMediaFile.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/abstracts/PlayableMediaFile.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/abstracts/PlayableMediaFile.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/abstracts/SizedMediaFile.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/abstracts/SizedMediaFile.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/abstracts/SizedMediaFile.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/abstracts/SizedMediaFile.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/abstracts/TelegramMediaFile.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/abstracts/TelegramMediaFile.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/abstracts/TelegramMediaFile.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/abstracts/TelegramMediaFile.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/abstracts/ThumbedMediaFile.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/abstracts/ThumbedMediaFile.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/abstracts/ThumbedMediaFile.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/abstracts/ThumbedMediaFile.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/abstracts/TitledMediaFile.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/abstracts/TitledMediaFile.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/abstracts/TitledMediaFile.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/abstracts/TitledMediaFile.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/games/CallbackGame.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/games/CallbackGame.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/games/CallbackGame.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/games/CallbackGame.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/games/Game.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/games/Game.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/games/Game.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/games/Game.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/games/GameHighScore.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/games/GameHighScore.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/games/GameHighScore.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/games/GameHighScore.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/games/RawGame.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/games/RawGame.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/games/RawGame.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/games/RawGame.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChannelEventMessage.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChannelEventMessage.kt similarity index 94% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChannelEventMessage.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChannelEventMessage.kt index 9631d8183c..a9598b5f48 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChannelEventMessage.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChannelEventMessage.kt @@ -4,7 +4,7 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.MessageIdentifier import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.ChannelChat import com.github.insanusmokrassar.TelegramBotAPI.types.message.ChatEvents.abstracts.ChannelEvent import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.ChatEventMessage -import org.joda.time.DateTime +import com.soywiz.klock.DateTime data class ChannelEventMessage( override val messageId: MessageIdentifier, diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChannelMediaGroupMessage.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChannelMediaGroupMessage.kt similarity index 97% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChannelMediaGroupMessage.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChannelMediaGroupMessage.kt index d66f9fca72..b6f84d2a02 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChannelMediaGroupMessage.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChannelMediaGroupMessage.kt @@ -7,7 +7,7 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.MediaGroupMessage import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.Message import com.github.insanusmokrassar.TelegramBotAPI.types.message.content.abstracts.MediaGroupContent -import org.joda.time.DateTime +import com.soywiz.klock.DateTime data class ChannelMediaGroupMessage( override val messageId: MessageIdentifier, diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChannelMessage.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChannelMessage.kt similarity index 96% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChannelMessage.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChannelMessage.kt index 1a2b11168b..4129da66fc 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChannelMessage.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChannelMessage.kt @@ -7,7 +7,7 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.CommonMessage import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.Message import com.github.insanusmokrassar.TelegramBotAPI.types.message.content.abstracts.MessageContent -import org.joda.time.DateTime +import com.soywiz.klock.DateTime data class ChannelMessage( override val messageId: MessageIdentifier, diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChatEvents/ChannelChatCreated.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChatEvents/ChannelChatCreated.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChatEvents/ChannelChatCreated.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChatEvents/ChannelChatCreated.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChatEvents/DeleteChatPhoto.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChatEvents/DeleteChatPhoto.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChatEvents/DeleteChatPhoto.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChatEvents/DeleteChatPhoto.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChatEvents/GroupChatCreated.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChatEvents/GroupChatCreated.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChatEvents/GroupChatCreated.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChatEvents/GroupChatCreated.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChatEvents/LeftChatMember.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChatEvents/LeftChatMember.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChatEvents/LeftChatMember.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChatEvents/LeftChatMember.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChatEvents/NewChatMembers.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChatEvents/NewChatMembers.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChatEvents/NewChatMembers.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChatEvents/NewChatMembers.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChatEvents/NewChatPhoto.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChatEvents/NewChatPhoto.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChatEvents/NewChatPhoto.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChatEvents/NewChatPhoto.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChatEvents/NewChatTitle.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChatEvents/NewChatTitle.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChatEvents/NewChatTitle.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChatEvents/NewChatTitle.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChatEvents/PinnedMessage.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChatEvents/PinnedMessage.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChatEvents/PinnedMessage.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChatEvents/PinnedMessage.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChatEvents/SupergroupChatCreated.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChatEvents/SupergroupChatCreated.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChatEvents/SupergroupChatCreated.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChatEvents/SupergroupChatCreated.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChatEvents/abstracts/ChannelEvent.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChatEvents/abstracts/ChannelEvent.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChatEvents/abstracts/ChannelEvent.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChatEvents/abstracts/ChannelEvent.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChatEvents/abstracts/ChatEvent.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChatEvents/abstracts/ChatEvent.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChatEvents/abstracts/ChatEvent.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChatEvents/abstracts/ChatEvent.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChatEvents/abstracts/CommonEvent.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChatEvents/abstracts/CommonEvent.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChatEvents/abstracts/CommonEvent.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChatEvents/abstracts/CommonEvent.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChatEvents/abstracts/GroupEvent.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChatEvents/abstracts/GroupEvent.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChatEvents/abstracts/GroupEvent.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChatEvents/abstracts/GroupEvent.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChatEvents/abstracts/SupergroupEvent.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChatEvents/abstracts/SupergroupEvent.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChatEvents/abstracts/SupergroupEvent.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ChatEvents/abstracts/SupergroupEvent.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/CommonMediaGroupMessage.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/CommonMediaGroupMessage.kt similarity index 96% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/CommonMediaGroupMessage.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/CommonMediaGroupMessage.kt index 6095cc3daf..026469d707 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/CommonMediaGroupMessage.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/CommonMediaGroupMessage.kt @@ -5,7 +5,7 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMa import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.* import com.github.insanusmokrassar.TelegramBotAPI.types.message.content.abstracts.MediaGroupContent -import org.joda.time.DateTime +import com.soywiz.klock.DateTime data class CommonMediaGroupMessage( override val messageId: MessageIdentifier, diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/CommonMessageImpl.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/CommonMessageImpl.kt similarity index 97% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/CommonMessageImpl.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/CommonMessageImpl.kt index e64ac56cea..e58b5f6852 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/CommonMessageImpl.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/CommonMessageImpl.kt @@ -7,7 +7,7 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.* import com.github.insanusmokrassar.TelegramBotAPI.types.message.content.abstracts.MessageContent import com.github.insanusmokrassar.TelegramBotAPI.types.message.payments.abstracts.PaymentInfo -import org.joda.time.DateTime +import com.soywiz.klock.DateTime data class CommonMessageImpl( override val messageId: MessageIdentifier, diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ForwardedMessage.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ForwardedMessage.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ForwardedMessage.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ForwardedMessage.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/GroupEventMessage.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/GroupEventMessage.kt similarity index 94% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/GroupEventMessage.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/GroupEventMessage.kt index d97146deca..c3b4340c52 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/GroupEventMessage.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/GroupEventMessage.kt @@ -4,7 +4,7 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.MessageIdentifier import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.GroupChat import com.github.insanusmokrassar.TelegramBotAPI.types.message.ChatEvents.abstracts.GroupEvent import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.ChatEventMessage -import org.joda.time.DateTime +import com.soywiz.klock.DateTime data class GroupEventMessage( override val messageId: MessageIdentifier, diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/RawMessage.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/RawMessage.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/RawMessage.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/RawMessage.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/SupergroupEventMessage.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/SupergroupEventMessage.kt similarity index 95% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/SupergroupEventMessage.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/SupergroupEventMessage.kt index cd5c34cdfc..89229f1a5d 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/SupergroupEventMessage.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/SupergroupEventMessage.kt @@ -4,7 +4,7 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.MessageIdentifier import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.SupergroupChat import com.github.insanusmokrassar.TelegramBotAPI.types.message.ChatEvents.abstracts.SupergroupEvent import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.ChatEventMessage -import org.joda.time.DateTime +import com.soywiz.klock.DateTime data class SupergroupEventMessage( override val messageId: MessageIdentifier, diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/abstracts/AbleToBeEditedMessage.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/abstracts/AbleToBeEditedMessage.kt similarity index 81% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/abstracts/AbleToBeEditedMessage.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/abstracts/AbleToBeEditedMessage.kt index c3213ef9f4..1c94dd56ae 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/abstracts/AbleToBeEditedMessage.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/abstracts/AbleToBeEditedMessage.kt @@ -1,6 +1,6 @@ package com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts -import org.joda.time.DateTime +import com.soywiz.klock.DateTime interface AbleToBeEditedMessage : Message { val editDate: DateTime? diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/abstracts/AbleToBeForwardedMessage.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/abstracts/AbleToBeForwardedMessage.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/abstracts/AbleToBeForwardedMessage.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/abstracts/AbleToBeForwardedMessage.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/abstracts/AbleToBeMarkedUp.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/abstracts/AbleToBeMarkedUp.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/abstracts/AbleToBeMarkedUp.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/abstracts/AbleToBeMarkedUp.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/abstracts/AbleToBePaymentedMessage.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/abstracts/AbleToBePaymentedMessage.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/abstracts/AbleToBePaymentedMessage.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/abstracts/AbleToBePaymentedMessage.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/abstracts/AbleToReplyMessage.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/abstracts/AbleToReplyMessage.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/abstracts/AbleToReplyMessage.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/abstracts/AbleToReplyMessage.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/abstracts/ChatEventMessage.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/abstracts/ChatEventMessage.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/abstracts/ChatEventMessage.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/abstracts/ChatEventMessage.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/abstracts/CommonMessage.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/abstracts/CommonMessage.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/abstracts/CommonMessage.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/abstracts/CommonMessage.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/abstracts/ContentMessage.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/abstracts/ContentMessage.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/abstracts/ContentMessage.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/abstracts/ContentMessage.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/abstracts/FromUserMessage.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/abstracts/FromUserMessage.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/abstracts/FromUserMessage.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/abstracts/FromUserMessage.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/abstracts/MediaGroupMessage.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/abstracts/MediaGroupMessage.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/abstracts/MediaGroupMessage.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/abstracts/MediaGroupMessage.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/abstracts/Message.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/abstracts/Message.kt similarity index 97% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/abstracts/Message.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/abstracts/Message.kt index 60d0e60dbc..2f40a44617 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/abstracts/Message.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/abstracts/Message.kt @@ -5,7 +5,7 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat import com.github.insanusmokrassar.TelegramBotAPI.types.message.RawMessage import kotlinx.serialization.* import kotlinx.serialization.internal.StringDescriptor -import org.joda.time.DateTime +import com.soywiz.klock.DateTime interface Message { val messageId: MessageIdentifier diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/ContactContent.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/ContactContent.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/ContactContent.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/ContactContent.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/GameContent.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/GameContent.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/GameContent.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/GameContent.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/LocationContent.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/LocationContent.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/LocationContent.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/LocationContent.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/PollContent.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/PollContent.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/PollContent.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/PollContent.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/TextContent.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/TextContent.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/TextContent.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/TextContent.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/VenueContent.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/VenueContent.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/VenueContent.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/VenueContent.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/abstracts/MediaCollectionContent.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/abstracts/MediaCollectionContent.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/abstracts/MediaCollectionContent.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/abstracts/MediaCollectionContent.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/abstracts/MediaContent.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/abstracts/MediaContent.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/abstracts/MediaContent.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/abstracts/MediaContent.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/abstracts/MediaGroupContent.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/abstracts/MediaGroupContent.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/abstracts/MediaGroupContent.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/abstracts/MediaGroupContent.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/abstracts/MessageContent.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/abstracts/MessageContent.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/abstracts/MessageContent.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/abstracts/MessageContent.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/abstracts/ResendableContent.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/abstracts/ResendableContent.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/abstracts/ResendableContent.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/abstracts/ResendableContent.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/media/AnimationContent.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/media/AnimationContent.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/media/AnimationContent.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/media/AnimationContent.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/media/AudioContent.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/media/AudioContent.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/media/AudioContent.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/media/AudioContent.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/media/DocumentContent.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/media/DocumentContent.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/media/DocumentContent.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/media/DocumentContent.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/media/PhotoContent.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/media/PhotoContent.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/media/PhotoContent.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/media/PhotoContent.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/media/StickerContent.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/media/StickerContent.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/media/StickerContent.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/media/StickerContent.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/media/VideoContent.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/media/VideoContent.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/media/VideoContent.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/media/VideoContent.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/media/VideoNoteContent.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/media/VideoNoteContent.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/media/VideoNoteContent.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/media/VideoNoteContent.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/media/VoiceContent.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/media/VoiceContent.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/media/VoiceContent.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/media/VoiceContent.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/payments/InvoiceOfPayment.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/payments/InvoiceOfPayment.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/payments/InvoiceOfPayment.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/payments/InvoiceOfPayment.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/payments/SuccessfulPaymentInfo.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/payments/SuccessfulPaymentInfo.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/payments/SuccessfulPaymentInfo.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/payments/SuccessfulPaymentInfo.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/payments/abstracts/PaymentInfo.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/payments/abstracts/PaymentInfo.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/payments/abstracts/PaymentInfo.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/payments/abstracts/PaymentInfo.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/payments/Invoice.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/payments/Invoice.kt similarity index 91% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/payments/Invoice.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/payments/Invoice.kt index 1d76520acf..a70fc06e56 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/payments/Invoice.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/payments/Invoice.kt @@ -4,7 +4,6 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.* import com.github.insanusmokrassar.TelegramBotAPI.types.payments.abstracts.* import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable -import java.util.* @Serializable data class Invoice( @@ -14,7 +13,6 @@ data class Invoice( val description: String, @SerialName(startParameterField) val startParameter: StartParameter, - @Serializable(CurrencySerializer::class) @SerialName(currencyField) override val currency: Currency, @SerialName(totalAmountField) diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/payments/LabeledPrice.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/payments/LabeledPrice.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/payments/LabeledPrice.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/payments/LabeledPrice.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/payments/OrderInfo.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/payments/OrderInfo.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/payments/OrderInfo.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/payments/OrderInfo.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/payments/PreCheckoutQuery.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/payments/PreCheckoutQuery.kt similarity index 93% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/payments/PreCheckoutQuery.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/payments/PreCheckoutQuery.kt index 6a773ed7bc..d70e187a71 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/payments/PreCheckoutQuery.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/payments/PreCheckoutQuery.kt @@ -4,7 +4,6 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.* import com.github.insanusmokrassar.TelegramBotAPI.types.payments.abstracts.* import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable -import java.util.* // TODO:: separate to normal classes hierarchy @Serializable @@ -13,7 +12,6 @@ data class PreCheckoutQuery( val id: PreCheckoutQueryId, @SerialName(fromField) val user: User, - @Serializable(CurrencySerializer::class) @SerialName(currencyField) override val currency: Currency, @SerialName(totalAmountField) diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/payments/ShippingAddress.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/payments/ShippingAddress.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/payments/ShippingAddress.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/payments/ShippingAddress.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/payments/ShippingOption.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/payments/ShippingOption.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/payments/ShippingOption.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/payments/ShippingOption.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/payments/ShippingQuery.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/payments/ShippingQuery.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/payments/ShippingQuery.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/payments/ShippingQuery.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/payments/SuccessfulPayment.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/payments/SuccessfulPayment.kt similarity index 93% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/payments/SuccessfulPayment.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/payments/SuccessfulPayment.kt index af3f2c87f7..b8059af6be 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/payments/SuccessfulPayment.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/payments/SuccessfulPayment.kt @@ -4,11 +4,9 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.* import com.github.insanusmokrassar.TelegramBotAPI.types.payments.abstracts.* import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable -import java.util.* @Serializable data class SuccessfulPayment( - @Serializable(CurrencySerializer::class) @SerialName(currencyField) override val currency: Currency, @SerialName(totalAmountField) diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/payments/abstracts/Amounted.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/payments/abstracts/Amounted.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/payments/abstracts/Amounted.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/payments/abstracts/Amounted.kt diff --git a/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/payments/abstracts/Currencied.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/payments/abstracts/Currencied.kt new file mode 100644 index 0000000000..5f91875617 --- /dev/null +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/payments/abstracts/Currencied.kt @@ -0,0 +1,7 @@ +package com.github.insanusmokrassar.TelegramBotAPI.types.payments.abstracts + +typealias Currency = String + +interface Currencied { + val currency: Currency +} diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/payments/abstracts/Priced.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/payments/abstracts/Priced.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/payments/abstracts/Priced.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/payments/abstracts/Priced.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/polls/Poll.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/polls/Poll.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/polls/Poll.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/polls/Poll.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/polls/PollOption.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/polls/PollOption.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/polls/PollOption.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/polls/PollOption.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/stickers/MaskPosition.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/stickers/MaskPosition.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/stickers/MaskPosition.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/stickers/MaskPosition.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/stickers/StickerSet.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/stickers/StickerSet.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/stickers/StickerSet.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/stickers/StickerSet.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/CallbackQueryUpdate.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/CallbackQueryUpdate.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/CallbackQueryUpdate.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/CallbackQueryUpdate.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/ChannelPostUpdate.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/ChannelPostUpdate.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/ChannelPostUpdate.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/ChannelPostUpdate.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/ChosenInlineResultUpdate.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/ChosenInlineResultUpdate.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/ChosenInlineResultUpdate.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/ChosenInlineResultUpdate.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/EditChannelPostUpdate.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/EditChannelPostUpdate.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/EditChannelPostUpdate.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/EditChannelPostUpdate.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/EditMessageUpdate.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/EditMessageUpdate.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/EditMessageUpdate.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/EditMessageUpdate.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/InlineQueryUpdate.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/InlineQueryUpdate.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/InlineQueryUpdate.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/InlineQueryUpdate.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/MediaGroupUpdates/ChannelPostMediaGroupUpdate.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/MediaGroupUpdates/ChannelPostMediaGroupUpdate.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/MediaGroupUpdates/ChannelPostMediaGroupUpdate.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/MediaGroupUpdates/ChannelPostMediaGroupUpdate.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/MediaGroupUpdates/EditChannelPostMediaGroupUpdate.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/MediaGroupUpdates/EditChannelPostMediaGroupUpdate.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/MediaGroupUpdates/EditChannelPostMediaGroupUpdate.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/MediaGroupUpdates/EditChannelPostMediaGroupUpdate.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/MediaGroupUpdates/EditMessageMediaGroupUpdate.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/MediaGroupUpdates/EditMessageMediaGroupUpdate.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/MediaGroupUpdates/EditMessageMediaGroupUpdate.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/MediaGroupUpdates/EditMessageMediaGroupUpdate.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/MediaGroupUpdates/MediaGroupUpdate.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/MediaGroupUpdates/MediaGroupUpdate.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/MediaGroupUpdates/MediaGroupUpdate.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/MediaGroupUpdates/MediaGroupUpdate.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/MediaGroupUpdates/MessageMediaGroupUpdate.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/MediaGroupUpdates/MessageMediaGroupUpdate.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/MediaGroupUpdates/MessageMediaGroupUpdate.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/MediaGroupUpdates/MessageMediaGroupUpdate.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/MessageUpdate.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/MessageUpdate.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/MessageUpdate.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/MessageUpdate.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/PollUpdate.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/PollUpdate.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/PollUpdate.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/PollUpdate.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/PreCheckoutQueryUpdate.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/PreCheckoutQueryUpdate.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/PreCheckoutQueryUpdate.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/PreCheckoutQueryUpdate.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/RawUpdate.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/RawUpdate.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/RawUpdate.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/RawUpdate.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/ShippingQueryUpdate.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/ShippingQueryUpdate.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/ShippingQueryUpdate.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/ShippingQueryUpdate.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/abstracts/BaseMessageUpdate.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/abstracts/BaseMessageUpdate.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/abstracts/BaseMessageUpdate.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/abstracts/BaseMessageUpdate.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/abstracts/Update.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/abstracts/Update.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/abstracts/Update.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/abstracts/Update.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/updateshandlers/FlowsUpdatesFilter.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/updateshandlers/FlowsUpdatesFilter.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/updateshandlers/FlowsUpdatesFilter.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/updateshandlers/FlowsUpdatesFilter.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/updateshandlers/KtorUpdatesPoller.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/updateshandlers/KtorUpdatesPoller.kt similarity index 73% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/updateshandlers/KtorUpdatesPoller.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/updateshandlers/KtorUpdatesPoller.kt index bed3424af0..811d42d31e 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/updateshandlers/KtorUpdatesPoller.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/updateshandlers/KtorUpdatesPoller.kt @@ -14,11 +14,13 @@ import com.github.insanusmokrassar.TelegramBotAPI.utils.* import com.github.insanusmokrassar.TelegramBotAPI.utils.extensions.UpdateReceiver import com.github.insanusmokrassar.TelegramBotAPI.utils.extensions.executeUnsafe import io.ktor.client.HttpClient -import io.ktor.client.engine.cio.CIO +import io.ktor.client.engine.HttpClientEngine import kotlinx.coroutines.* +import kotlinx.coroutines.channels.Channel fun KtorUpdatesPoller( telegramAPIUrlsKeeper: TelegramAPIUrlsKeeper, + engine: HttpClientEngine, timeoutSeconds: Int? = null, oneTimeUpdatesLimit: Int? = null, allowedUpdates: List = ALL_UPDATES_LIST, @@ -27,17 +29,7 @@ fun KtorUpdatesPoller( ): KtorUpdatesPoller { val executor = KtorRequestsExecutor( telegramAPIUrlsKeeper, - HttpClient( - CIO.create { - timeoutSeconds ?.let { _ -> - val timeout = timeoutSeconds.toLong() * 1000 - endpoint.apply { - keepAliveTime = timeout - connectTimeout = 1000 - } - } - } - ) + HttpClient(engine) ) return KtorUpdatesPoller( @@ -55,7 +47,7 @@ class KtorUpdatesPoller( private val timeoutSeconds: Int? = null, private val oneTimeUpdatesLimit: Int? = null, private val allowedUpdates: List = ALL_UPDATES_LIST, - private val exceptionsHandler: (Exception) -> Boolean = { it.printStackTrace(); true }, + private val exceptionsHandler: (Exception) -> Boolean = { true }, private val updatesReceiver: UpdateReceiver ) : UpdatesPoller { private var lastHandledUpdate: UpdateIdentifier = 0L @@ -110,30 +102,42 @@ class KtorUpdatesPoller( pushMediaGroupUpdate() } - @Synchronized - override fun start(scope: CoroutineScope) { - pollerJob ?: scope.launch { - executor.executeUnsafe(DeleteWebhook()) - while (isActive) { - try { - val updates = getUpdates() - handleUpdates(updates) - } catch (e: Exception) { - if (exceptionsHandler(e)) { - continue - } else { - close() - break + private val startStopScope = CoroutineScope(Dispatchers.Default) + private val startStopQueue = Channel(2) + private val startStopJob = startStopScope.launch { + for (scope in startStopQueue) { + scope ?.also { + pollerJob ?: scope.launch { + executor.executeUnsafe(DeleteWebhook()) + while (isActive) { + try { + val updates = getUpdates() + handleUpdates(updates) + } catch (e: Exception) { + if (exceptionsHandler(e)) { + continue + } else { + close() + break + } + } } + }.also { + pollerJob = it } + } ?: also { + startStopQueue.close() + pollerJob ?.cancel() + startStopScope.cancel() + return@launch } - }.also { - pollerJob = it } } + override fun start(scope: CoroutineScope) { + startStopQueue.offer(scope) + } - @Synchronized override fun close() { - pollerJob ?.cancel() + startStopQueue.offer(null) } } \ No newline at end of file diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/updateshandlers/UpdatesFilter.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/updateshandlers/UpdatesFilter.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/updateshandlers/UpdatesFilter.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/updateshandlers/UpdatesFilter.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/BaseMessageUpdateToMediaGroupUpdate.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/BaseMessageUpdateToMediaGroupUpdate.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/BaseMessageUpdateToMediaGroupUpdate.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/BaseMessageUpdateToMediaGroupUpdate.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/Captions.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/Captions.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/Captions.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/Captions.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/HtmlCaptionSourcer.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/HtmlCaptionSourcer.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/HtmlCaptionSourcer.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/HtmlCaptionSourcer.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/JSON.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/JSON.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/JSON.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/JSON.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/Map.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/Map.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/Map.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/Map.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/MarkdownCaptionSourcer.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/MarkdownCaptionSourcer.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/MarkdownCaptionSourcer.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/MarkdownCaptionSourcer.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/Matrix.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/Matrix.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/Matrix.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/Matrix.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/MediaGroupList.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/MediaGroupList.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/MediaGroupList.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/MediaGroupList.kt diff --git a/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/StorageFile.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/StorageFile.kt new file mode 100644 index 0000000000..eacc026511 --- /dev/null +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/StorageFile.kt @@ -0,0 +1,12 @@ +package com.github.insanusmokrassar.TelegramBotAPI.utils + +import kotlinx.io.core.Input +import kotlinx.serialization.Serializable + +@Serializable +expect class StorageFile { + val contentType: String + val fileName: String + fun generateCustomName(): String + fun asInput(): Input +} diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/StringFormatting.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/StringFormatting.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/StringFormatting.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/StringFormatting.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/TelegramAPIUrlsKeeper.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/TelegramAPIUrlsKeeper.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/TelegramAPIUrlsKeeper.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/TelegramAPIUrlsKeeper.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/extensions/Executes.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/extensions/Executes.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/extensions/Executes.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/extensions/Executes.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/extensions/ReceiveChannel.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/extensions/ReceiveChannel.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/extensions/ReceiveChannel.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/extensions/ReceiveChannel.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/extensions/String.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/extensions/String.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/extensions/String.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/extensions/String.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/extensions/UpdatesPolling.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/extensions/UpdatesPolling.kt similarity index 96% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/extensions/UpdatesPolling.kt rename to src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/extensions/UpdatesPolling.kt index 8ef77a802f..903967173b 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/extensions/UpdatesPolling.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/extensions/UpdatesPolling.kt @@ -9,13 +9,12 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.update.abstracts.Update import com.github.insanusmokrassar.TelegramBotAPI.updateshandlers.KtorUpdatesPoller import com.github.insanusmokrassar.TelegramBotAPI.updateshandlers.UpdatesFilter import kotlinx.coroutines.* -import java.util.concurrent.Executors typealias UpdateReceiver = suspend (T) -> Unit fun RequestsExecutor.startGettingOfUpdates( timeoutMillis: Long = 30 * 1000, - scope: CoroutineScope = CoroutineScope(Executors.newFixedThreadPool(4).asCoroutineDispatcher()), + scope: CoroutineScope = CoroutineScope(Dispatchers.Default), allowedUpdates: List? = null, block: UpdateReceiver ): UpdatesPoller { @@ -84,7 +83,7 @@ fun RequestsExecutor.startGettingOfUpdates( preCheckoutQueryCallback: UpdateReceiver? = null, pollCallback: UpdateReceiver? = null, timeoutMillis: Long = 30 * 1000, - scope: CoroutineScope = GlobalScope + scope: CoroutineScope = CoroutineScope(Dispatchers.Default) ): UpdatesPoller = startGettingOfUpdates( messageCallback = messageCallback, messageMediaGroupCallback = mediaGroupCallback, diff --git a/src/test/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/BotActionTests.kt b/src/commonTest/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/BotActionTests.kt similarity index 100% rename from src/test/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/BotActionTests.kt rename to src/commonTest/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/BotActionTests.kt diff --git a/src/test/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatIdentifierTests.kt b/src/commonTest/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatIdentifierTests.kt similarity index 100% rename from src/test/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatIdentifierTests.kt rename to src/commonTest/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatIdentifierTests.kt diff --git a/src/test/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ParseModeTests.kt b/src/commonTest/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ParseModeTests.kt similarity index 100% rename from src/test/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ParseModeTests.kt rename to src/commonTest/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ParseModeTests.kt diff --git a/src/test/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/TelegramDateTests.kt b/src/commonTest/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/TelegramDateTests.kt similarity index 97% rename from src/test/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/TelegramDateTests.kt rename to src/commonTest/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/TelegramDateTests.kt index ee9fd95ead..648965a44c 100644 --- a/src/test/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/TelegramDateTests.kt +++ b/src/commonTest/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/TelegramDateTests.kt @@ -1,9 +1,9 @@ package com.github.insanusmokrassar.TelegramBotAPI.types +import com.soywiz.klock.DateTime import kotlinx.serialization.ImplicitReflectionSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.json.Json -import org.joda.time.DateTime import java.util.concurrent.TimeUnit import kotlin.test.Test import kotlin.test.assertEquals diff --git a/src/jsMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/StorageFile.kt b/src/jsMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/StorageFile.kt new file mode 100644 index 0000000000..8f236a770f --- /dev/null +++ b/src/jsMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/StorageFile.kt @@ -0,0 +1,19 @@ +package com.github.insanusmokrassar.TelegramBotAPI.utils + +import com.benasher44.uuid.uuid4 +import kotlinx.io.core.Input +import kotlinx.serialization.Serializable +import kotlinx.serialization.Transient + +@Serializable +actual data class StorageFile( + actual val contentType: String, + actual val fileName: String, + @Transient + val inputGetter: () -> Input = throw IllegalStateException("Can't create object without input"), + @Transient + val extension: String = throw IllegalStateException("Can't create object without extension") +) { + actual fun asInput(): Input = inputGetter() + actual fun generateCustomName(): String = "${uuid4()}.$extension" +} \ No newline at end of file diff --git a/src/jvmMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/abstracts/InputFileFromJavaFile.kt b/src/jvmMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/abstracts/InputFileFromJavaFile.kt new file mode 100644 index 0000000000..e521ef23e1 --- /dev/null +++ b/src/jvmMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/abstracts/InputFileFromJavaFile.kt @@ -0,0 +1,8 @@ +package com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts + +import com.github.insanusmokrassar.TelegramBotAPI.utils.StorageFile +import java.io.File + +fun File.toInputFile(): InputFile = MultipartFile( + StorageFile(this) +) diff --git a/src/jvmMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/UserLocale.kt b/src/jvmMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/UserLocale.kt new file mode 100644 index 0000000000..e61d97e2ea --- /dev/null +++ b/src/jvmMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/UserLocale.kt @@ -0,0 +1,7 @@ +package com.github.insanusmokrassar.TelegramBotAPI.types + +import java.util.* + +fun User.javaLocale(): Locale? = languageCode ?.let { + Locale.forLanguageTag(it) +} diff --git a/src/jvmMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/payments/Currencied.kt b/src/jvmMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/payments/Currencied.kt new file mode 100644 index 0000000000..aa8a0a4037 --- /dev/null +++ b/src/jvmMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/payments/Currencied.kt @@ -0,0 +1,6 @@ +package com.github.insanusmokrassar.TelegramBotAPI.types.payments + +import com.github.insanusmokrassar.TelegramBotAPI.types.payments.abstracts.Currencied +import java.util.* + +fun Currencied.javaCurrency(): Currency = Currency.getInstance(currency) diff --git a/src/jvmMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/updateshandlers/KtorUpdatesCIOPoller.kt b/src/jvmMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/updateshandlers/KtorUpdatesCIOPoller.kt new file mode 100644 index 0000000000..76b5dbee61 --- /dev/null +++ b/src/jvmMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/updateshandlers/KtorUpdatesCIOPoller.kt @@ -0,0 +1,44 @@ +package com.github.insanusmokrassar.TelegramBotAPI.updateshandlers + +import com.github.insanusmokrassar.TelegramBotAPI.bot.Ktor.KtorRequestsExecutor +import com.github.insanusmokrassar.TelegramBotAPI.types.ALL_UPDATES_LIST +import com.github.insanusmokrassar.TelegramBotAPI.types.update.abstracts.Update +import com.github.insanusmokrassar.TelegramBotAPI.utils.* +import com.github.insanusmokrassar.TelegramBotAPI.utils.extensions.UpdateReceiver +import io.ktor.client.HttpClient +import io.ktor.client.engine.cio.CIO +import io.ktor.client.engine.cio.endpoint +import io.ktor.util.KtorExperimentalAPI + +@KtorExperimentalAPI +fun KtorUpdatesPoller( + telegramAPIUrlsKeeper: TelegramAPIUrlsKeeper, + timeoutSeconds: Int? = null, + oneTimeUpdatesLimit: Int? = null, + allowedUpdates: List = ALL_UPDATES_LIST, + exceptionsHandler: (Exception) -> Boolean = { true }, + updatesReceiver: UpdateReceiver +): KtorUpdatesPoller { + val executor = KtorRequestsExecutor( + telegramAPIUrlsKeeper, + HttpClient( + CIO.create { + endpoint { + timeoutSeconds ?.times(1000) ?.also { timeOutMillis -> + keepAliveTime = timeOutMillis.toLong() + } + connectTimeout = 1000 + } + } + ) + ) + + return KtorUpdatesPoller( + executor, + timeoutSeconds, + oneTimeUpdatesLimit, + allowedUpdates, + exceptionsHandler, + updatesReceiver + ) +} diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/updateshandlers/webhook/WebhookPrivateKeyConfig.kt b/src/jvmMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/updateshandlers/webhook/WebhookPrivateKeyConfig.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/updateshandlers/webhook/WebhookPrivateKeyConfig.kt rename to src/jvmMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/updateshandlers/webhook/WebhookPrivateKeyConfig.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/StorageFile.kt b/src/jvmMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/StorageFile.kt similarity index 53% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/StorageFile.kt rename to src/jvmMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/StorageFile.kt index 4173370af3..03ea499383 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/StorageFile.kt +++ b/src/jvmMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/StorageFile.kt @@ -1,20 +1,20 @@ package com.github.insanusmokrassar.TelegramBotAPI.utils +import com.benasher44.uuid.uuid4 import kotlinx.io.core.Input import kotlinx.io.streams.asInput import kotlinx.serialization.Serializable import kotlinx.serialization.Transient import java.io.File import java.nio.file.Files -import java.util.* @Serializable -data class StorageFile( +actual class StorageFile( @Transient private val file: File = throw IllegalStateException("Can't create object without file") ) { - val contentType: String = Files.probeContentType(file.toPath()) - val fileName: String = file.name - fun generateCustomName(): String = "${UUID.randomUUID()}.${file.extension}" - fun asInput(): Input = Files.newInputStream(file.toPath()).asInput() + actual val contentType: String = Files.probeContentType(file.toPath()) + actual val fileName: String = file.name + actual fun generateCustomName(): String = "${uuid4()}.${file.extension}" + actual fun asInput(): Input = Files.newInputStream(file.toPath()).asInput() } diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/extensions/AsReference.kt b/src/jvmMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/extensions/AsReference.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/extensions/AsReference.kt rename to src/jvmMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/extensions/AsReference.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/extensions/Webhooks.kt b/src/jvmMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/extensions/Webhooks.kt similarity index 100% rename from src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/extensions/Webhooks.kt rename to src/jvmMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/extensions/Webhooks.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/payments/abstracts/Currencied.kt b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/payments/abstracts/Currencied.kt deleted file mode 100644 index 15c523d6ad..0000000000 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/payments/abstracts/Currencied.kt +++ /dev/null @@ -1,21 +0,0 @@ -package com.github.insanusmokrassar.TelegramBotAPI.types.payments.abstracts - -import kotlinx.serialization.* -import java.util.* - -interface Currencied { - val currency: Currency -} - -@Serializer(Currency::class) -object CurrencySerializer : KSerializer { - override fun serialize(encoder: Encoder, obj: Currency) { - encoder.encodeString(obj.currencyCode) - } - - override fun deserialize(decoder: Decoder): Currency { - return decoder.decodeString().let { - Currency.getInstance(it) - } - } -}