1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-12-22 16:47:13 +00:00

migrate core project in new package

This commit is contained in:
InsanusMokrassar 2020-10-04 17:06:30 +06:00
parent 64862ecd2d
commit 34fcfe2e20
758 changed files with 3891 additions and 3891 deletions

View File

@ -246,7 +246,7 @@
* `TelegramBotAPI`:
* `UnknownUpdateType` was renamed to `UnknownUpdate`
* Refactoring and optimization of `FlowsUpdatesFilter`
* `Venue` type was replaced to a new package: `com.github.insanusmokrassar.TelegramBotAPI.types.venue.Venue`
* `Venue` type was replaced to a new package: `dev.inmo.tgbotapi.types.venue.Venue`
* `Venue` type now implements `Locationed` and delegate realisation to its `location` field
* `FoursquareId` and `FoursquareType` typealiases were added
* `TelegramBotAPI-extensions-utils`:
@ -410,7 +410,7 @@
* `GetMyCommands` request was added
* `SetMyCommands` request was added
* `GetMe` now is object instead of class
* `GetMe` was replaced into package `com.github.insanusmokrassar.TelegramBotAPI.requests.bot.GetMe`
* `GetMe` was replaced into package `dev.inmo.tgbotapi.requests.bot.GetMe`
* `CreateNewStickerSet` renamed to `CreateStaticNewStickerSet`
* `CreateNewAnimatedStickerSet` request was added (it handle work with `tgs_sticker`)
* `StickerSet#thumb` was added
@ -425,7 +425,7 @@
* Extensions `sendDice` was added
* Extension `getMyCommands` request was added
* Extension `setMyCommands` request was added
* Extension `getMe` was replaced into package `com.github.insanusmokrassar.TelegramBotAPI.extensions.api.bot.GetMeKt.getMe`
* Extension `getMe` was replaced into package `dev.inmo.tgbotapi.extensions.api.bot.GetMeKt.getMe`
* **All extensions `createNewStickerSet` was renamed to `createNewStaticStickerSet`**
* Extensions `createNewAnimatedStickerSet` was added
* **All extensions `addStickerToSet` was renamed to `addStaticStickerToSet`**
@ -546,8 +546,8 @@
### 0.24.1
* `TelegramBotAPI`:
* `UpdateReceiver` was replaced to the package `com.github.insanusmokrassar.TelegramBotAPI.updateshandlers`
* All functions inside `com.github.insanusmokrassar.TelegramBotAPI.utils.extensions.UpdatesPolling` are deprecated
* `UpdateReceiver` was replaced to the package `dev.inmo.tgbotapi.updateshandlers`
* All functions inside `dev.inmo.tgbotapi.utils.extensions.UpdatesPolling` are deprecated
and will be removed in some soon versions. Their replacement are able inside `TelegramBotAPI-extensions-api`
* `UpdatesFilter` is interface for now
* Previous `UpdatesFilter` class was renamed to `SimpleUpdatesFilter` and for backward compatibility was added
@ -563,8 +563,8 @@
* `KtorRequestsExecutor` now is using a copy of incoming `HttpClient` object and install `HttpTimeout` feature
* `AbstractRequestCallFactory` now setting up a custom delay in case if request is `GetUpdates`
* `TelegramBotAPI-extensions-api`:
* All functions from `com.github.insanusmokrassar.TelegramBotAPI.utils.extensions.UpdatesPolling` now available
in package `com.github.insanusmokrassar.TelegramBotAPI.extensions.api.updates.UpdatesPolling`
* All functions from `dev.inmo.tgbotapi.utils.extensions.UpdatesPolling` now available
in package `dev.inmo.tgbotapi.extensions.api.updates.UpdatesPolling`
* Now new method of getting updates available: `startGettingUpdates` with `UpdatesFilter` as incoming first
parameter
* `startGettingUpdates` with `receiver` and `allowedUpdates` parameters now will handle updates by itself
@ -797,29 +797,29 @@ bot.
* `requestSerializer` - field, which must provide serializer of current type
* `resultDeserializer` - field, which must provide opportunity to deserializer result. Previously it was a function
* Removed deprecations:
* `com.github.insanusmokrassar.TelegramBotAPI.utils.extensions.WebhookPrivateKeyConfig`
* `com.github.insanusmokrassar.TelegramBotAPI.utils.extensions.UpdatesFilter`
* `com.github.insanusmokrassar.TelegramBotAPI.utils.extensions.createSimpleUpdateFilter`
* `com.github.insanusmokrassar.TelegramBotAPI.utils.createMarkdownText`
* `com.github.insanusmokrassar.TelegramBotAPI.utils.toMarkdownCaption`
* `com.github.insanusmokrassar.TelegramBotAPI.utils.toMarkdownText`
* `com.github.insanusmokrassar.TelegramBotAPI.updateshandlers.KtorUpdatesPoller`
* `com.github.insanusmokrassar.TelegramBotAPI.types.message.content.abstracts.CaptionedMediaContent`
* `com.github.insanusmokrassar.TelegramBotAPI.types.message.CommonForwardedMessage`
* `com.github.insanusmokrassar.TelegramBotAPI.types.InputMedia.CaptionedInputMedia`
* `com.github.insanusmokrassar.TelegramBotAPI.types.games.Game#text`
* `com.github.insanusmokrassar.TelegramBotAPI.types.games.Game#textEntities`
* `com.github.insanusmokrassar.TelegramBotAPI.types.files.PathedFileKt.makeFileUrl`
* `com.github.insanusmokrassar.TelegramBotAPI.types.files.PathedFileKt.downloadingFilesBaseUrl`
* `com.github.insanusmokrassar.TelegramBotAPI.requests.send.media.base.Data`
* `com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.ByInlineMessageId`
* `com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.ByMessageId`
* `com.github.insanusmokrassar.TelegramBotAPI.bot.RequestException`
* `com.github.insanusmokrassar.TelegramBotAPI.bot.exceptions.ReplyMessageNotFound`
* `com.github.insanusmokrassar.TelegramBotAPI.bot.BaseRequestsExecutor#baseUrl`
* `com.github.insanusmokrassar.TelegramBotAPI.bot.BaseRequestsExecutor#constructor(token, hostUrl)`
* `com.github.insanusmokrassar.TelegramBotAPI.bot.Ktor.KtorRequestsExecutor#constructor(token, client, hostUrl, callsFactories, excludeDefaultFactories, requestsLimiter, jsonFormatter)`
* `com.github.insanusmokrassar.TelegramBotAPI.bot.Ktor.KtorRequestsExecutor#constructor(token, engine, hostUrl)`
* `dev.inmo.tgbotapi.utils.extensions.WebhookPrivateKeyConfig`
* `dev.inmo.tgbotapi.utils.extensions.UpdatesFilter`
* `dev.inmo.tgbotapi.utils.extensions.createSimpleUpdateFilter`
* `dev.inmo.tgbotapi.utils.createMarkdownText`
* `dev.inmo.tgbotapi.utils.toMarkdownCaption`
* `dev.inmo.tgbotapi.utils.toMarkdownText`
* `dev.inmo.tgbotapi.updateshandlers.KtorUpdatesPoller`
* `dev.inmo.tgbotapi.types.message.content.abstracts.CaptionedMediaContent`
* `dev.inmo.tgbotapi.types.message.CommonForwardedMessage`
* `dev.inmo.tgbotapi.types.InputMedia.CaptionedInputMedia`
* `dev.inmo.tgbotapi.types.games.Game#text`
* `dev.inmo.tgbotapi.types.games.Game#textEntities`
* `dev.inmo.tgbotapi.types.files.PathedFileKt.makeFileUrl`
* `dev.inmo.tgbotapi.types.files.PathedFileKt.downloadingFilesBaseUrl`
* `dev.inmo.tgbotapi.requests.send.media.base.Data`
* `dev.inmo.tgbotapi.CommonAbstracts.types.ByInlineMessageId`
* `dev.inmo.tgbotapi.CommonAbstracts.types.ByMessageId`
* `dev.inmo.tgbotapi.bot.RequestException`
* `dev.inmo.tgbotapi.bot.exceptions.ReplyMessageNotFound`
* `dev.inmo.tgbotapi.bot.BaseRequestsExecutor#baseUrl`
* `dev.inmo.tgbotapi.bot.BaseRequestsExecutor#constructor(token, hostUrl)`
* `dev.inmo.tgbotapi.bot.Ktor.KtorRequestsExecutor#constructor(token, client, hostUrl, callsFactories, excludeDefaultFactories, requestsLimiter, jsonFormatter)`
* `dev.inmo.tgbotapi.bot.Ktor.KtorRequestsExecutor#constructor(token, engine, hostUrl)`
## 0.18.0 Raws cleaning
@ -955,7 +955,7 @@ some default library
by their parents
* `StopPoll` implemented
* All current `Chat` abstractions are deprecated and rewritten as typealiases. Use `Chat` abstractions from
`com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts` package
`dev.inmo.tgbotapi.types.chat.abstracts` package
* Common Groups now may have pinned message
* `is_member` field added into `RestrictedChatMember`
* **BREAK CHANGES** Now `ForwardedMessages` can be `AnonymousForwardedMessage` and `PublicForwardedMessage`. Old
@ -1084,7 +1084,7 @@ work with media groups lists
## 0.9.0
* Old extension `OkHttpClient.Builder#useWith` now deprecated and must be replaced by the same in
`com.github.insanusmokrassar.TelegramBotAPI.bot.Ktor` package
`dev.inmo.tgbotapi.bot.Ktor` package
* Replace `ProxySettings` data class in `settings` package, deprecate old link
* `BaseRequestsExecutor` now have no it's own scope
* Add `RequestLimiter` and base realisations

View File

@ -1,26 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
import com.github.insanusmokrassar.TelegramBotAPI.utils.fullListOfSubSource
interface Captioned {
val caption: String?
}
interface CaptionedOutput : Captioned {
val parseMode: ParseMode?
}
interface CaptionedInput : Captioned {
/**
* Not full list of entities. This list WILL NOT contain [TextPart]s with [com.github.insanusmokrassar.TelegramBotAPI.types.MessageEntity.textsources.RegularTextSource]
* @see [CaptionedInput.fullEntitiesList]
*/
val captionEntities: List<TextPart>
}
/**
* Convert its [CaptionedInput.captionEntities] to list of [com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.TextSource]
* with [com.github.insanusmokrassar.TelegramBotAPI.types.MessageEntity.textsources.RegularTextSource]
*/
fun CaptionedInput.fullEntitiesList(): FullTextSourcesList = caption ?.fullListOfSubSource(captionEntities) ?.map { it.source } ?: emptyList()

View File

@ -1,7 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts
import com.github.insanusmokrassar.TelegramBotAPI.utils.MimeType
interface MimeTyped {
val mimeType: MimeType?
}

View File

@ -1,5 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts
interface Performerable {
val performer: String?
}

View File

@ -1,5 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts
interface Titled {
val title: String?
}

View File

@ -1,7 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
interface ChatRequest {
val chatId: ChatIdentifier
}

View File

@ -1,5 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types
interface DisableNotification {
val disableNotification: Boolean
}

View File

@ -1,7 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineMessageIdentifier
interface InlineMessageAction {
val inlineMessageId: InlineMessageIdentifier
}

View File

@ -1,7 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types
import com.github.insanusmokrassar.TelegramBotAPI.types.MessageIdentifier
interface MessageAction: ChatRequest {
val messageId: MessageIdentifier
}

View File

@ -1,7 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.KeyboardMarkup
interface ReplyMarkup {
val replyMarkup: KeyboardMarkup?
}

View File

@ -1,7 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types
import com.github.insanusmokrassar.TelegramBotAPI.types.MessageIdentifier
interface ReplyMessageId {
val replyToMessageId: MessageIdentifier?
}

View File

@ -1,7 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types
import com.github.insanusmokrassar.TelegramBotAPI.types.TelegramDate
interface UntilDate {
val untilDate: TelegramDate?
}

View File

@ -1,7 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.bot
import com.github.insanusmokrassar.TelegramBotAPI.utils.TelegramAPIUrlsKeeper
abstract class BaseRequestsExecutor(
protected val telegramAPIUrlsKeeper: TelegramAPIUrlsKeeper
) : RequestsExecutor

View File

@ -1,24 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.bot
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.Request
import io.ktor.utils.io.core.Closeable
/**
* Interface for making requests to Telegram Bot API. Currently, there is only one built-in implementation -
* [com.github.insanusmokrassar.TelegramBotAPI.bot.Ktor.KtorRequestsExecutor]
*
* @see Request
* @see com.github.insanusmokrassar.TelegramBotAPI.bot.Ktor.KtorRequestsExecutor
*/
interface RequestsExecutor : Closeable {
/**
* Unsafe execution of incoming [request]. Can throw almost any exception. So, it is better to use
* something like [com.github.insanusmokrassar.TelegramBotAPI.extensions.utils.shortcuts.executeAsync] or
* [com.github.insanusmokrassar.TelegramBotAPI.extensions.utils.shortcuts.executeUnsafe]
*
* @throws Exception
*/
suspend fun <T : Any> execute(request: Request<T>): T
}
typealias TelegramBot = RequestsExecutor

View File

@ -1,9 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.chat.abstracts
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.ChatRequest
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest
import com.github.insanusmokrassar.TelegramBotAPI.types.UserId
interface ChatMemberRequest<T: Any> : ChatRequest, SimpleRequest<T> {
val userId: UserId
}

View File

@ -1,21 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.chat.get
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.ChatRequest
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.ExtendedChatSerializer
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.extended.ExtendedChat
import com.github.insanusmokrassar.TelegramBotAPI.types.chatIdField
import kotlinx.serialization.*
@Serializable
data class GetChat(
@SerialName(chatIdField)
override val chatId: ChatIdentifier
): ChatRequest, SimpleRequest<ExtendedChat> {
override fun method(): String = "getChat"
override val resultDeserializer: DeserializationStrategy<ExtendedChat>
get() = ExtendedChatSerializer
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}

View File

@ -1,8 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.edit.abstracts
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.MessageAction
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.ContentMessage
import com.github.insanusmokrassar.TelegramBotAPI.types.message.content.abstracts.MessageContent
interface EditChatMessage<MT: MessageContent> : SimpleRequest<ContentMessage<MT>>, MessageAction

View File

@ -1,7 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.edit.abstracts
import com.github.insanusmokrassar.TelegramBotAPI.types.InputMedia.InputMedia
interface EditMediaMessage {
val media: InputMedia
}

View File

@ -1,8 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.edit.abstracts
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.ReplyMarkup
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
interface EditReplyMessage : ReplyMarkup {
override val replyMarkup: InlineKeyboardMarkup?
}

View File

@ -1,8 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.edit.abstracts
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
interface EditTextChatMessage {
val text: String
val parseMode: ParseMode?
}

View File

@ -1,5 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.send.abstracts
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.ReplyMarkup
interface ReplyingMarkupSendMessageRequest<T: Any>: SendMessageRequest<T>, ReplyMarkup

View File

@ -1,6 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.send.abstracts
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.ChatRequest
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest
interface SendChatMessageRequest<T: Any> : SimpleRequest<T>, ChatRequest

View File

@ -1,6 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.send.abstracts
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.DisableNotification
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.ReplyMessageId
interface SendMessageRequest<T: Any> : SendChatMessageRequest<T>, ReplyMessageId, DisableNotification

View File

@ -1,8 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.send.abstracts
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
interface TextableSendMessageRequest<T: Any>: SendMessageRequest<T> {
val text: String?
val parseMode: ParseMode?
}

View File

@ -1,5 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.send.media.base
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest
interface DataRequest<T: Any> : SimpleRequest<T>

View File

@ -1,5 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.send.media.base
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.MultipartFile
typealias Files = Map<String, MultipartFile>

View File

@ -1,8 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.stickers.abstracts
import com.github.insanusmokrassar.TelegramBotAPI.types.stickers.MaskPosition
interface StandardStickerSetAction : StickerSetAction {
val emojis: String // must be more than one
val maskPosition: MaskPosition?
}

View File

@ -1,5 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.CallbackQuery
interface DataCallbackQuery : CallbackQuery {
val data: String
}

View File

@ -1,7 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.CallbackQuery
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineMessageIdentifier
interface InlineMessageIdCallbackQuery : CallbackQuery {
val inlineMessageId: InlineMessageIdentifier
}

View File

@ -1,7 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.CallbackQuery
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.Message
interface MessageCallbackQuery : CallbackQuery {
val message: Message
}

View File

@ -1,13 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.CallbackQuery
import com.github.insanusmokrassar.TelegramBotAPI.types.CallbackQueryIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.User
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.Message
data class MessageDataCallbackQuery(
override val id: CallbackQueryIdentifier,
override val user: User,
override val chatInstance: String,
override val message: Message,
override val data: String
) : DataCallbackQuery, MessageCallbackQuery

View File

@ -1,13 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.CallbackQuery
import com.github.insanusmokrassar.TelegramBotAPI.types.CallbackQueryIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.User
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.Message
data class MessageGameShortNameCallbackQuery(
override val id: CallbackQueryIdentifier,
override val user: User,
override val chatInstance: String,
override val message: Message,
override val gameShortName: String
) : GameShortNameCallbackQuery, MessageCallbackQuery

View File

@ -1,10 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.ChatMember
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatMember.abstracts.BannedChatMember
import com.github.insanusmokrassar.TelegramBotAPI.types.TelegramDate
import com.github.insanusmokrassar.TelegramBotAPI.types.User
data class KickedChatMember(
override val user: User,
override val untilDate: TelegramDate?
) : BannedChatMember

View File

@ -1,7 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.ChatMember
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatMember.abstracts.ChatMember
import com.github.insanusmokrassar.TelegramBotAPI.types.User
data class LeftChatMember(override val user: User) :
ChatMember

View File

@ -1,7 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.ChatMember
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatMember.abstracts.ChatMember
import com.github.insanusmokrassar.TelegramBotAPI.types.User
data class MemberChatMember(override val user: User) :
ChatMember

View File

@ -1,5 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.ChatMember.abstracts
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.UntilDate
interface BannedChatMember : ChatMember, UntilDate

View File

@ -1,11 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.ChosenInlineResult
import com.github.insanusmokrassar.TelegramBotAPI.types.*
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.abstracts.ChosenInlineResult
data class BaseChosenInlineResult(
override val resultId: InlineQueryIdentifier,
override val user: User,
override val inlineMessageId: InlineMessageIdentifier?,
override val query: String
) : ChosenInlineResult

View File

@ -1,30 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.FileId
import com.github.insanusmokrassar.TelegramBotAPI.types.*
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.results.audio.InlineQueryResultAudioCached
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.results.audio.inlineQueryResultAudioType
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.abstracts.InputMessageContent
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.parseModeField
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
@Serializable
data class InlineQueryResultAudioCachedImpl(
@SerialName(idField)
override val id: InlineQueryIdentifier,
@SerialName(audioFileIdField)
override val fileId: FileId,
@SerialName(captionField)
override val caption: String? = null,
@SerialName(parseModeField)
override val parseMode: ParseMode? = null,
@SerialName(replyMarkupField)
override val replyMarkup: InlineKeyboardMarkup? = null,
@SerialName(inputMessageContentField)
override val inputMessageContent: InputMessageContent? = null
) : InlineQueryResultAudioCached {
override val type: String = inlineQueryResultAudioType
}

View File

@ -1,18 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.InlineQueryResult
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueryIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
import com.github.insanusmokrassar.TelegramBotAPI.types.gameShortNameField
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
@Serializable
class InlineQueryResultGame(
override val id: InlineQueryIdentifier,
@SerialName(gameShortNameField)
val gameShortName: String,
override val replyMarkup: InlineKeyboardMarkup? = null
) : InlineQueryResult {
override val type: String = "game"
}

View File

@ -1,32 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.FileId
import com.github.insanusmokrassar.TelegramBotAPI.types.*
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.results.gif.InlineQueryResultGifCached
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.results.gif.inlineQueryResultGifType
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.abstracts.InputMessageContent
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.parseModeField
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
@Serializable
data class InlineQueryResultGifCachedImpl(
@SerialName(idField)
override val id: InlineQueryIdentifier,
@SerialName(gifFileIdField)
override val fileId: FileId,
@SerialName(titleField)
override val title: String? = null,
@SerialName(captionField)
override val caption: String? = null,
@SerialName(parseModeField)
override val parseMode: ParseMode? = null,
@SerialName(replyMarkupField)
override val replyMarkup: InlineKeyboardMarkup? = null,
@SerialName(inputMessageContentField)
override val inputMessageContent: InputMessageContent? = null
) : InlineQueryResultGifCached {
override val type: String = inlineQueryResultGifType
}

View File

@ -1,32 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.FileId
import com.github.insanusmokrassar.TelegramBotAPI.types.*
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.results.mpeg4gif.InlineQueryResultMpeg4GifCached
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.results.mpeg4gif.inlineQueryResultMpeg4GifType
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.abstracts.InputMessageContent
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.parseModeField
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
@Serializable
data class InlineQueryResultMpeg4GifCachedImpl(
@SerialName(idField)
override val id: InlineQueryIdentifier,
@SerialName(mpeg4GifFileIdField)
override val fileId: FileId,
@SerialName(titleField)
override val title: String? = null,
@SerialName(captionField)
override val caption: String? = null,
@SerialName(parseModeField)
override val parseMode: ParseMode? = null,
@SerialName(replyMarkupField)
override val replyMarkup: InlineKeyboardMarkup? = null,
@SerialName(inputMessageContentField)
override val inputMessageContent: InputMessageContent? = null
) : InlineQueryResultMpeg4GifCached {
override val type: String = inlineQueryResultMpeg4GifType
}

View File

@ -1,32 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.FileId
import com.github.insanusmokrassar.TelegramBotAPI.types.*
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.results.voice.InlineQueryResultVoiceCached
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.results.voice.inlineQueryResultVoiceType
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.abstracts.InputMessageContent
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.parseModeField
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
@Serializable
data class InlineQueryResultVoiceCachedImpl(
@SerialName(idField)
override val id: InlineQueryIdentifier,
@SerialName(voiceFileIdField)
override val fileId: FileId,
@SerialName(titleField)
override val title: String,
@SerialName(captionField)
override val caption: String? = null,
@SerialName(parseModeField)
override val parseMode: ParseMode? = null,
@SerialName(replyMarkupField)
override val replyMarkup: InlineKeyboardMarkup? = null,
@SerialName(inputMessageContentField)
override val inputMessageContent: InputMessageContent? = null
) : InlineQueryResultVoiceCached {
override val type: String = inlineQueryResultVoiceType
}

View File

@ -1,5 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts
interface DescribedInlineQueryResult : InlineQueryResult {
val description: String?
}

View File

@ -1,5 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts
interface DuratedInlineResultQuery {
val duration: Int?
}

View File

@ -1,7 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.FileId
interface FileInlineQueryResult: InlineQueryResult {
val fileId: FileId
}

View File

@ -1,13 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.serializers.InlineQueryResultSerializer
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueryIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
import kotlinx.serialization.Serializable
@Serializable(InlineQueryResultSerializer::class)
interface InlineQueryResult {
val type: String
val id: InlineQueryIdentifier
val replyMarkup: InlineKeyboardMarkup?
}

View File

@ -1,5 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.Titled
interface OptionallyTitledInlineQueryResult : InlineQueryResult, Titled

View File

@ -1,5 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts
interface UrlInlineQueryResult : InlineQueryResult {
val url: String?
}

View File

@ -1,7 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.FileId
interface WithFileIdInlineQueryResult {
val fileId: FileId
}

View File

@ -1,7 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.abstracts.InputMessageContent
interface WithInputMessageContentInlineQueryResult : InlineQueryResult {
val inputMessageContent: InputMessageContent?
}

View File

@ -1,6 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.results.audio
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.Performerable
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.*
interface InlineQueryResultAudio : InlineQueryResultAudioCommon, UrlInlineQueryResult, DuratedInlineResultQuery, Performerable, TitledInlineQueryResult

View File

@ -1,5 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.results.audio
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.WithFileIdInlineQueryResult
interface InlineQueryResultAudioCached : InlineQueryResultAudioCommon, WithFileIdInlineQueryResult

View File

@ -1,11 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.results.audio
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.CaptionedOutput
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.InlineQueryResult
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.WithInputMessageContentInlineQueryResult
const val inlineQueryResultAudioType = "audio"
interface InlineQueryResultAudioCommon : InlineQueryResult,
CaptionedOutput,
WithInputMessageContentInlineQueryResult

View File

@ -1,6 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.results.document
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.MimeTyped
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.*
interface InlineQueryResultDocument : InlineQueryResultDocumentCommon, UrlInlineQueryResult, ThumbedInlineQueryResult, ThumbSizedInlineQueryResult, MimeTyped

View File

@ -1,5 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.results.document
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.WithFileIdInlineQueryResult
interface InlineQueryResultDocumentCached : InlineQueryResultDocumentCommon, WithFileIdInlineQueryResult

View File

@ -1,12 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.results.document
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.CaptionedOutput
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.*
const val inlineQueryResultDocumentType = "document"
interface InlineQueryResultDocumentCommon : InlineQueryResult,
TitledInlineQueryResult,
DescribedInlineQueryResult,
CaptionedOutput,
WithInputMessageContentInlineQueryResult

View File

@ -1,5 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.results.gif
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.*
interface InlineQueryResultGif : InlineQueryResultGifCommon, UrlInlineQueryResult, ThumbedWithMimeTypeInlineQueryResult, SizedInlineQueryResult, DuratedInlineResultQuery

View File

@ -1,5 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.results.gif
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.WithFileIdInlineQueryResult
interface InlineQueryResultGifCached : InlineQueryResultGifCommon, WithFileIdInlineQueryResult

View File

@ -1,11 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.results.gif
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.CaptionedOutput
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.*
const val inlineQueryResultGifType = "gif"
interface InlineQueryResultGifCommon : InlineQueryResult,
OptionallyTitledInlineQueryResult,
CaptionedOutput,
WithInputMessageContentInlineQueryResult

View File

@ -1,5 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.results.mpeg4gif
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.*
interface InlineQueryResultMpeg4Gif : InlineQueryResultMpeg4GifCommon, UrlInlineQueryResult, ThumbedWithMimeTypeInlineQueryResult, SizedInlineQueryResult, DuratedInlineResultQuery

View File

@ -1,5 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.results.mpeg4gif
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.WithFileIdInlineQueryResult
interface InlineQueryResultMpeg4GifCached : InlineQueryResultMpeg4GifCommon, WithFileIdInlineQueryResult

View File

@ -1,11 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.results.mpeg4gif
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.CaptionedOutput
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.*
const val inlineQueryResultMpeg4GifType = "mpeg4_gif"
interface InlineQueryResultMpeg4GifCommon : InlineQueryResult,
OptionallyTitledInlineQueryResult,
CaptionedOutput,
WithInputMessageContentInlineQueryResult

View File

@ -1,5 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.results.photo
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.*
interface InlineQueryResultPhoto : InlineQueryResultPhotoCommon, UrlInlineQueryResult, ThumbedInlineQueryResult, SizedInlineQueryResult

View File

@ -1,5 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.results.photo
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.WithFileIdInlineQueryResult
interface InlineQueryResultPhotoCached : InlineQueryResultPhotoCommon, WithFileIdInlineQueryResult

View File

@ -1,12 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.results.photo
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.CaptionedOutput
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.*
const val inlineQueryResultPhotoType = "photo"
interface InlineQueryResultPhotoCommon : InlineQueryResult,
OptionallyTitledInlineQueryResult,
DescribedInlineQueryResult,
CaptionedOutput,
WithInputMessageContentInlineQueryResult

View File

@ -1,6 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.results.video
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.MimeTyped
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.*
interface InlineQueryResultVideo : InlineQueryResultVideoCommon, UrlInlineQueryResult, ThumbedInlineQueryResult, MimeTyped, SizedInlineQueryResult, DuratedInlineResultQuery

View File

@ -1,5 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.results.video
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.WithFileIdInlineQueryResult
interface InlineQueryResultVideoCached : InlineQueryResultVideoCommon, WithFileIdInlineQueryResult

View File

@ -1,12 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.results.video
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.CaptionedOutput
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.*
const val inlineQueryResultVideoType = "video"
interface InlineQueryResultVideoCommon : InlineQueryResult,
TitledInlineQueryResult,
DescribedInlineQueryResult,
CaptionedOutput,
WithInputMessageContentInlineQueryResult

View File

@ -1,6 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.results.voice
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.DuratedInlineResultQuery
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.UrlInlineQueryResult
interface InlineQueryResultVoice : InlineQueryResultVoiceCommon, UrlInlineQueryResult, DuratedInlineResultQuery

View File

@ -1,5 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.results.voice
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.WithFileIdInlineQueryResult
interface InlineQueryResultVoiceCached : InlineQueryResultVoiceCommon, WithFileIdInlineQueryResult

View File

@ -1,11 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.results.voice
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.CaptionedOutput
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.*
const val inlineQueryResultVoiceType = "voice"
interface InlineQueryResultVoiceCommon : InlineQueryResult,
CaptionedOutput,
WithInputMessageContentInlineQueryResult,
TitledInlineQueryResult

View File

@ -1,18 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InputMessageContent
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.Livable
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.Locationed
import com.github.insanusmokrassar.TelegramBotAPI.types.*
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.abstracts.InputMessageContent
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
@Serializable
data class InputLocationMessageContent(
@SerialName(latitudeField)
override val latitude: Double,
@SerialName(longitudeField)
override val longitude: Double,
@SerialName(livePeriodField)
override val livePeriod: Int? = null
) : Locationed, Livable, InputMessageContent

View File

@ -1,21 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InputMessageContent
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.CaptionedOutput
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.DisableWebPagePreview
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.abstracts.InputMessageContent
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.parseModeField
import com.github.insanusmokrassar.TelegramBotAPI.types.disableWebPagePreviewField
import com.github.insanusmokrassar.TelegramBotAPI.types.messageTextField
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
@Serializable
data class InputTextMessageContent(
@SerialName(messageTextField)
override val caption: String,
@SerialName(parseModeField)
override val parseMode: ParseMode? = null,
@SerialName(disableWebPagePreviewField)
override val disableWebPagePreview: Boolean? = null
) : CaptionedOutput, DisableWebPagePreview, InputMessageContent

View File

@ -1,11 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.abstracts
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueryIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.User
interface InlineQuery {
val id: InlineQueryIdentifier
val from: User
val query: String
val offset: String
}

View File

@ -1,7 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.abstracts
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InputMessageContentSerializer
import kotlinx.serialization.Serializable
@Serializable(InputMessageContentSerializer::class)
interface InputMessageContent

View File

@ -1,12 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.query
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.abstracts.InlineQuery
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueryIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.User
data class BaseInlineQuery(
override val id: InlineQueryIdentifier,
override val from: User,
override val query: String,
override val offset: String
) : InlineQuery

View File

@ -1,12 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.query
import com.github.insanusmokrassar.TelegramBotAPI.types.*
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.abstracts.InlineQuery
data class LocationInlineQuery(
override val id: InlineQueryIdentifier,
override val from: User,
override val query: String,
override val offset: String,
val location: Location
) : InlineQuery

View File

@ -1,3 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.buttons
typealias Matrix<T> = List<List<T>>

View File

@ -1,3 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts
interface ChannelChat : SuperPublicChat

View File

@ -1,15 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatId
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.PreviewChatSerializer
import kotlinx.serialization.Serializable
@Serializable(PreviewChatSerializer::class)
interface Chat {
val id: ChatId
}
data class UnknownChatType(
override val id: ChatId,
val raw: String
) : Chat

View File

@ -1,3 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts
interface GroupChat : PublicChat

View File

@ -1,5 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts
interface PublicChat : Chat {
val title: String
}

View File

@ -1,3 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts
interface SuperPublicChat : PublicChat, UsernameChat

View File

@ -1,3 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts
interface SupergroupChat : GroupChat, SuperPublicChat

View File

@ -1,7 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts
import com.github.insanusmokrassar.TelegramBotAPI.types.Username
interface UsernameChat : Chat {
val username: Username?
}

View File

@ -1,5 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.extended
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.ChannelChat
interface ExtendedChannelChat : ChannelChat, ExtendedPublicChat

View File

@ -1,11 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.extended
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatPhoto
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.ExtendedChatSerializer
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat
import kotlinx.serialization.Serializable
@Serializable(ExtendedChatSerializer::class)
interface ExtendedChat : Chat {
val chatPhoto: ChatPhoto?
}

View File

@ -1,8 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.extended
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.ChatPermissions
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.GroupChat
interface ExtendedGroupChat : GroupChat, ExtendedPublicChat {
val permissions: ChatPermissions
}

View File

@ -1,5 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.extended
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PrivateChat
interface ExtendedPrivateChat : PrivateChat, ExtendedChat

View File

@ -1,13 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.extended
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PublicChat
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.Message
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.TelegramBotAPIMessageDeserializeOnlySerializer
import kotlinx.serialization.Serializable
interface ExtendedPublicChat : ExtendedChat, PublicChat {
val description: String
val inviteLink: String?
@Serializable(TelegramBotAPIMessageDeserializeOnlySerializer::class)
val pinnedMessage: Message?
}

View File

@ -1,10 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.extended
import com.github.insanusmokrassar.TelegramBotAPI.types.StickerSetName
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.SupergroupChat
interface ExtendedSupergroupChat : SupergroupChat, ExtendedGroupChat {
val slowModeDelay: Long?
val stickerSetName: StickerSetName?
val canSetStickerSet: Boolean
}

View File

@ -1,18 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.files
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.FileId
import com.github.insanusmokrassar.TelegramBotAPI.types.FileUniqueId
import com.github.insanusmokrassar.TelegramBotAPI.types.fileUniqueIdField
import com.github.insanusmokrassar.TelegramBotAPI.types.files.abstracts.*
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
@Serializable
data class File(
@SerialName(fileIdField)
override val fileId: FileId,
@SerialName(fileUniqueIdField)
override val fileUniqueId: FileUniqueId,
@SerialName(fileSizeField)
override val fileSize: Long? = null
): TelegramMediaFile

View File

@ -1,7 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.files.abstracts
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.MimeTyped
internal const val mimeTypeField = "mime_type"
interface MimedMediaFile : TelegramMediaFile, MimeTyped

View File

@ -1,7 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.files.abstracts
import com.github.insanusmokrassar.TelegramBotAPI.types.files.PhotoSize
interface ThumbedMediaFile : TelegramMediaFile {
val thumb: PhotoSize?
}

View File

@ -1,5 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.files.abstracts
interface TitledMediaFile {
val title: String?
}

View File

@ -1,14 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.message
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 com.soywiz.klock.DateTime
data class ChannelEventMessage(
override val messageId: MessageIdentifier,
override val chat: ChannelChat,
override val chatEvent: ChannelEvent,
override val date: DateTime
) : ChatEventMessage

View File

@ -1,22 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.message
import com.github.insanusmokrassar.TelegramBotAPI.types.MediaGroupIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.MessageIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
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 com.soywiz.klock.DateTime
data class ChannelMediaGroupMessage(
override val messageId: MessageIdentifier,
override val chat: Chat,
override val date: DateTime,
override val mediaGroupId: MediaGroupIdentifier,
override val content: MediaGroupContent,
override val editDate: DateTime?,
override val forwardInfo: ForwardInfo?,
override val replyTo: Message?,
override val replyMarkup: InlineKeyboardMarkup?
) : MediaGroupMessage

View File

@ -1,22 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.message
import com.github.insanusmokrassar.TelegramBotAPI.types.*
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.Message
import com.github.insanusmokrassar.TelegramBotAPI.types.message.content.abstracts.MessageContent
import com.github.insanusmokrassar.TelegramBotAPI.types.message.content.abstracts.PossiblySentViaBotCommonMessage
import com.soywiz.klock.DateTime
data class ChannelMessage<T: MessageContent>(
override val messageId: MessageIdentifier,
override val chat: Chat,
override val content: T,
override val date: DateTime,
override val editDate: DateTime?,
override val forwardInfo: ForwardInfo?,
override val replyTo: Message?,
override val replyMarkup: InlineKeyboardMarkup?,
override val senderBot: CommonBot?,
val authorSignature: AuthorSignature?
) : PossiblySentViaBotCommonMessage<T>

View File

@ -1,5 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.message.ChatEvents
import com.github.insanusmokrassar.TelegramBotAPI.types.message.ChatEvents.abstracts.ChannelEvent
class ChannelChatCreated: ChannelEvent

View File

@ -1,5 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.message.ChatEvents
import com.github.insanusmokrassar.TelegramBotAPI.types.message.ChatEvents.abstracts.CommonEvent
class DeleteChatPhoto: CommonEvent

Some files were not shown because too many files have changed in this diff Show More