From 215c8793e1d428d954b2c36cd2bc9771b977ce71 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Fri, 24 Apr 2020 20:25:53 +0600 Subject: [PATCH] optimize imports --- .../TelegramBotAPI/extensions/api/send/polls/SendPoll.kt | 5 ++--- .../TelegramBotAPI/extensions/api/updates/UpdatesPolling.kt | 1 - .../extensions/utils/updates/UpdatesChatFilters.kt | 2 +- .../TelegramBotAPI/bot/Ktor/KtorRequestsExecutor.kt | 1 - .../types/MessageEntity/textsources/TextMentionTextSource.kt | 1 - .../buttons/InlineKeyboardButtons/InlineKeyboardButton.kt | 1 - .../InlineKeyboardButtons/InlineKeyboardButtonSerializer.kt | 3 ++- .../insanusmokrassar/TelegramBotAPI/types/dice/Dice.kt | 3 ++- .../TelegramBotAPI/types/message/content/DiceContent.kt | 3 ++- .../insanusmokrassar/TelegramBotAPI/types/polls/Poll.kt | 5 ++--- .../TelegramBotAPI/types/update/RawUpdate.kt | 1 - .../insanusmokrassar/TelegramBotAPI/utils/StorageFile.kt | 1 - 12 files changed, 11 insertions(+), 16 deletions(-) diff --git a/TelegramBotAPI-extensions-api/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/extensions/api/send/polls/SendPoll.kt b/TelegramBotAPI-extensions-api/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/extensions/api/send/polls/SendPoll.kt index a4cb7298c6..dc0c78fbd2 100644 --- a/TelegramBotAPI-extensions-api/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/extensions/api/send/polls/SendPoll.kt +++ b/TelegramBotAPI-extensions-api/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/extensions/api/send/polls/SendPoll.kt @@ -3,13 +3,12 @@ package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.send.polls import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor import com.github.insanusmokrassar.TelegramBotAPI.requests.send.polls.SendQuizPoll import com.github.insanusmokrassar.TelegramBotAPI.requests.send.polls.SendRegularPoll -import com.github.insanusmokrassar.TelegramBotAPI.types.* +import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier +import com.github.insanusmokrassar.TelegramBotAPI.types.MessageIdentifier import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.KeyboardMarkup import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat import com.github.insanusmokrassar.TelegramBotAPI.types.polls.* -import kotlinx.serialization.SerialName -import kotlinx.serialization.Transient suspend fun RequestsExecutor.sendRegularPoll( chatId: ChatIdentifier, diff --git a/TelegramBotAPI-extensions-api/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/extensions/api/updates/UpdatesPolling.kt b/TelegramBotAPI-extensions-api/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/extensions/api/updates/UpdatesPolling.kt index 9f18c87bc1..5deeb7fcb4 100644 --- a/TelegramBotAPI-extensions-api/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/extensions/api/updates/UpdatesPolling.kt +++ b/TelegramBotAPI-extensions-api/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/extensions/api/updates/UpdatesPolling.kt @@ -12,7 +12,6 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.update.abstracts.Update import com.github.insanusmokrassar.TelegramBotAPI.updateshandlers.* import com.github.insanusmokrassar.TelegramBotAPI.utils.PreviewFeature import com.github.insanusmokrassar.TelegramBotAPI.utils.handleSafely -import io.ktor.client.features.HttpRequestTimeoutException import kotlinx.coroutines.* fun RequestsExecutor.startGettingOfUpdates( diff --git a/TelegramBotAPI-extensions-utils/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/extensions/utils/updates/UpdatesChatFilters.kt b/TelegramBotAPI-extensions-utils/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/extensions/utils/updates/UpdatesChatFilters.kt index d4a95cd1c3..ab619f683a 100644 --- a/TelegramBotAPI-extensions-utils/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/extensions/utils/updates/UpdatesChatFilters.kt +++ b/TelegramBotAPI-extensions-utils/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/extensions/utils/updates/UpdatesChatFilters.kt @@ -2,7 +2,7 @@ package com.github.insanusmokrassar.TelegramBotAPI.extensions.utils.updates import com.github.insanusmokrassar.TelegramBotAPI.types.ChatId import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat -import com.github.insanusmokrassar.TelegramBotAPI.types.update.MediaGroupUpdates.* +import com.github.insanusmokrassar.TelegramBotAPI.types.update.MediaGroupUpdates.SentMediaGroupUpdate import com.github.insanusmokrassar.TelegramBotAPI.types.update.abstracts.BaseMessageUpdate import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.filter diff --git a/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/Ktor/KtorRequestsExecutor.kt b/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/Ktor/KtorRequestsExecutor.kt index 5f8bc97d5f..b9714d11b3 100644 --- a/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/Ktor/KtorRequestsExecutor.kt +++ b/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/Ktor/KtorRequestsExecutor.kt @@ -10,7 +10,6 @@ import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.Request import com.github.insanusmokrassar.TelegramBotAPI.types.Response import com.github.insanusmokrassar.TelegramBotAPI.types.RetryAfterError import com.github.insanusmokrassar.TelegramBotAPI.utils.* -import com.github.insanusmokrassar.TelegramBotAPI.utils.nonstrictJsonFormat import io.ktor.client.HttpClient import io.ktor.client.call.receive import io.ktor.client.features.* diff --git a/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/textsources/TextMentionTextSource.kt b/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/textsources/TextMentionTextSource.kt index 8f1a37fd4f..5ebac31a50 100644 --- a/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/textsources/TextMentionTextSource.kt +++ b/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/textsources/TextMentionTextSource.kt @@ -3,7 +3,6 @@ package com.github.insanusmokrassar.TelegramBotAPI.types.MessageEntity.textsourc import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.MultilevelTextSource import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.TextPart import com.github.insanusmokrassar.TelegramBotAPI.types.User -import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PrivateChat import com.github.insanusmokrassar.TelegramBotAPI.utils.* class TextMentionTextSource( diff --git a/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/InlineKeyboardButtons/InlineKeyboardButton.kt b/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/InlineKeyboardButtons/InlineKeyboardButton.kt index c8ea32297b..cba8a5f2c5 100644 --- a/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/InlineKeyboardButtons/InlineKeyboardButton.kt +++ b/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/InlineKeyboardButtons/InlineKeyboardButton.kt @@ -5,7 +5,6 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.games.CallbackGame import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable import kotlinx.serialization.json.JsonElement -import kotlinx.serialization.json.JsonObject @Serializable(InlineKeyboardButtonSerializer::class) sealed class InlineKeyboardButton { diff --git a/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/InlineKeyboardButtons/InlineKeyboardButtonSerializer.kt b/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/InlineKeyboardButtons/InlineKeyboardButtonSerializer.kt index ea575f1d0e..c6e08ada73 100644 --- a/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/InlineKeyboardButtons/InlineKeyboardButtonSerializer.kt +++ b/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/InlineKeyboardButtons/InlineKeyboardButtonSerializer.kt @@ -3,7 +3,8 @@ package com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardB import com.github.insanusmokrassar.TelegramBotAPI.types.* import com.github.insanusmokrassar.TelegramBotAPI.utils.nonstrictJsonFormat import kotlinx.serialization.* -import kotlinx.serialization.json.* +import kotlinx.serialization.json.JsonElementSerializer +import kotlinx.serialization.json.JsonObject internal object InlineKeyboardButtonSerializer : KSerializer { override val descriptor: SerialDescriptor = SerialDescriptor( diff --git a/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/dice/Dice.kt b/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/dice/Dice.kt index 46a192ad07..e798bbf23f 100644 --- a/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/dice/Dice.kt +++ b/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/dice/Dice.kt @@ -1,7 +1,8 @@ package com.github.insanusmokrassar.TelegramBotAPI.types.dice import com.github.insanusmokrassar.TelegramBotAPI.types.* -import kotlinx.serialization.* +import kotlinx.serialization.SerialName +import kotlinx.serialization.Serializable @Serializable data class Dice( diff --git a/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/DiceContent.kt b/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/DiceContent.kt index 5ec258a679..3093a7b42d 100644 --- a/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/DiceContent.kt +++ b/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/DiceContent.kt @@ -2,7 +2,8 @@ package com.github.insanusmokrassar.TelegramBotAPI.types.message.content import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.Request import com.github.insanusmokrassar.TelegramBotAPI.requests.send.SendDice -import com.github.insanusmokrassar.TelegramBotAPI.types.* +import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier +import com.github.insanusmokrassar.TelegramBotAPI.types.MessageIdentifier import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.KeyboardMarkup import com.github.insanusmokrassar.TelegramBotAPI.types.dice.Dice import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.ContentMessage diff --git a/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/polls/Poll.kt b/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/polls/Poll.kt index d90633ee48..667da57d1f 100644 --- a/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/polls/Poll.kt +++ b/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/polls/Poll.kt @@ -4,13 +4,12 @@ import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.CaptionedInput import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.TextPart import com.github.insanusmokrassar.TelegramBotAPI.types.* import com.github.insanusmokrassar.TelegramBotAPI.types.MessageEntity.* -import com.github.insanusmokrassar.TelegramBotAPI.types.MessageEntity.RawMessageEntity -import com.github.insanusmokrassar.TelegramBotAPI.types.MessageEntity.asTextParts import com.github.insanusmokrassar.TelegramBotAPI.utils.nonstrictJsonFormat import com.soywiz.klock.DateTime import com.soywiz.klock.TimeSpan import kotlinx.serialization.* -import kotlinx.serialization.json.* +import kotlinx.serialization.json.JsonObject +import kotlinx.serialization.json.JsonObjectSerializer sealed class ScheduledCloseInfo { abstract val closeDateTime: DateTime diff --git a/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/RawUpdate.kt b/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/RawUpdate.kt index e27b840986..809c0ea145 100644 --- a/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/RawUpdate.kt +++ b/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/update/RawUpdate.kt @@ -5,7 +5,6 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.ChosenInli import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.query.RawInlineQuery import com.github.insanusmokrassar.TelegramBotAPI.types.UpdateIdentifier import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.* -import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.TelegramBotAPIMessageDeserializeOnlySerializer import com.github.insanusmokrassar.TelegramBotAPI.types.payments.PreCheckoutQuery import com.github.insanusmokrassar.TelegramBotAPI.types.payments.ShippingQuery import com.github.insanusmokrassar.TelegramBotAPI.types.polls.Poll diff --git a/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/StorageFile.kt b/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/StorageFile.kt index 1acd7ffdbf..7d1cbe6bcf 100644 --- a/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/StorageFile.kt +++ b/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/StorageFile.kt @@ -3,7 +3,6 @@ package com.github.insanusmokrassar.TelegramBotAPI.utils import com.benasher44.uuid.uuid4 import io.ktor.utils.io.core.Input import kotlinx.serialization.Serializable -import kotlinx.serialization.Transient @Serializable data class StorageFileInfo(