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

Merge pull request #146 from InsanusMokrassar/0.29.0

0.29.0
This commit is contained in:
InsanusMokrassar 2020-10-04 19:46:22 +06:00 committed by GitHub
commit 2378237fc5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
854 changed files with 7025 additions and 6295 deletions

View File

@ -1,13 +1,37 @@
# TelegramBotAPI changelog
## 0.29.0
* **THIS VERSION CONTAINS BREAKING CHANGES**
* ***PROJECT PACKAGES WERE CHANGED***
* Packages in the whole project were changed `com.github.insanusmokrassar.TelegramBotAPI` -> `dev.inmo.tgbotapi`
* Project group in repositories were changed: `com.github.insanusmokrassar` -> `dev.inmo`
* Migration ([Examples migration](https://github.com/InsanusMokrassar/TelegramBotAPI-examples/pull/11)):
1. Change implementation in your gradle files:
* `implementation "com.github.insanusmokrassar:TelegramBotAPI-core:*"` -> `implementation "dev.inmo:tgbotapi.core:*"`
* `implementation "com.github.insanusmokrassar:TelegramBotAPI-extensions-utils:*"` -> `implementation "dev.inmo:tgbotapi.extensions.utils:*"`
* `implementation "com.github.insanusmokrassar:TelegramBotAPI-extensions-api:*"` -> `implementation "dev.inmo:tgbotapi.extensions.api:*"`
* `implementation "com.github.insanusmokrassar:TelegramBotAPI:*"` -> `implementation "dev.inmo:tgbotapi:*"`
2. Replace packages `com.github.insanusmokrassar.TelegramBotAPI` in the whole project by `dev.inmo.tgbotapi`
* `TelegramBotAPI-core`:
* Now in forward info you can get `ForwardFromSupergroupInfo`
* **BREAKING CHANGE** `SendVoice` factory function has changed its signature: now it have now `thumb`
(according to the [documentation](https://core.telegram.org/bots/api#sendvoice))
* `TelegramBotAPI-extensions-api`:
* ALL REQUESTS EXECUTOR USAGES WERE REPLACED WITH `TelegramBot` TYPEALIAS. It should not bring any break changes
* Internal changes of `sendRegularPoll` and `sendQuizPoll` extensions
* Variable `defaultLivePeriodDelayMillis` now is public
* All `send` extensions for `TelegramBot` got their `reply` variations (issue [#144](https://github.com/InsanusMokrassar/TelegramBotAPI/issues/144))
* A lot of `send` extensions for `TelegramBot` got their variation with `Chat` instead of `ChatIdentifier`
## 0.28.0
**THIS VERSION CONTAINS BREAKING CHANGES**
***PROJECT PACKAGES WERE CHANGED***
* Project `TelegramBotAPI` -> `TelegramBotAPI-core`
* Project `TelegramBotAPI-all` -> `TelegramBotAPI`
* **THIS VERSION CONTAINS BREAKING CHANGES**
* ***PROJECT PACKAGES WERE CHANGED***
* Project `TelegramBotAPI` -> `TelegramBotAPI-core`
* Project `TelegramBotAPI-all` -> `TelegramBotAPI`
* `Common`:
* Version updates:

View File

@ -3,10 +3,10 @@
| Common info | [![Awesome Kotlin Badge](https://kotlin.link/awesome-kotlin.svg)](https://github.com/KotlinBy/awesome-kotlin) [![Build Status](https://travis-ci.com/InsanusMokrassar/TelegramBotAPI.svg?branch=master)](https://travis-ci.com/InsanusMokrassar/TelegramBotAPI) [Small survey](https://forms.gle/2Hex2ynbHWHhi1KY7)|
| -------------------------------------:|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Useful links | [![Chat in Telegram](badges/chat.svg)](https://t.me/InMoTelegramBotAPI) [![KDocs](badges/kdocs.svg)](https://tgbotapi.inmo.dev/docs/index.html) [Examples](https://github.com/InsanusMokrassar/TelegramBotAPI-examples/), [Mini tutorial](https://bookstack.inmo.dev/books/telegrambotapi/chapter/introduction-tutorial) |
| TelegramBotAPI Core status | [![Download](https://api.bintray.com/packages/insanusmokrassar/StandardRepository/TelegramBotAPI-core/images/download.svg)](https://bintray.com/insanusmokrassar/StandardRepository/TelegramBotAPI-core/_latestVersion) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.insanusmokrassar/TelegramBotAPI-core/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.github.insanusmokrassar/TelegramBotAPI) |
| TelegramBotAPI Extensions status | [![Download](https://api.bintray.com/packages/insanusmokrassar/StandardRepository/TelegramBotAPI-extensions-api/images/download.svg)](https://bintray.com/insanusmokrassar/StandardRepository/TelegramBotAPI-extensions-api/_latestVersion) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.insanusmokrassar/TelegramBotAPI-extensions-api/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.github.insanusmokrassar/TelegramBotAPI-extensions-api) |
| TelegramBotAPI Util Extensions status | [![Download](https://api.bintray.com/packages/insanusmokrassar/StandardRepository/TelegramBotAPI-extensions-utils/images/download.svg)](https://bintray.com/insanusmokrassar/StandardRepository/TelegramBotAPI-extensions-utils/_latestVersion) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.insanusmokrassar/TelegramBotAPI-extensions-utils/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.github.insanusmokrassar/TelegramBotAPI-extensions-utils) |
| TelegramBotAPI All status | [![Download](https://api.bintray.com/packages/insanusmokrassar/StandardRepository/TelegramBotAPI/images/download.svg)](https://bintray.com/insanusmokrassar/StandardRepository/TelegramBotAPI/_latestVersion) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.insanusmokrassar/TelegramBotAPI/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.github.insanusmokrassar/TelegramBotAPI-all) |
| TelegramBotAPI Core status | [![Download](https://api.bintray.com/packages/insanusmokrassar/TelegramBotAPI/tgbotapi.core/images/download.svg)](https://bintray.com/insanusmokrassar/TelegramBotAPI/tgbotapi.core/_latestVersion) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi.core/badge.svg)](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi.core) |
| TelegramBotAPI Extensions status | [![Download](https://api.bintray.com/packages/insanusmokrassar/TelegramBotAPI/tgbotapi.extensions.api/images/download.svg)](https://bintray.com/insanusmokrassar/TelegramBotAPI/tgbotapi.extensions.api/_latestVersion) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi.extensions.api/badge.svg)](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi.extensions.api) |
| TelegramBotAPI Util Extensions status | [![Download](https://api.bintray.com/packages/insanusmokrassar/TelegramBotAPI/tgbotapi.extensions.utils/images/download.svg)](https://bintray.com/insanusmokrassar/TelegramBotAPI/tgbotapi.extensions.utils/_latestVersion) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi.extensions.utils/badge.svg)](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi.extensions.utils) |
| TelegramBotAPI All status | [![Download](https://api.bintray.com/packages/insanusmokrassar/TelegramBotAPI/tgbotapi/images/download.svg)](https://bintray.com/insanusmokrassar/TelegramBotAPI/tgbotapi/_latestVersion) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi/badge.svg)](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi) |
**At the time of publication of version `0.28.0` there are errors in serialization plugins like
[kotlinx.serialization#1004](https://github.com/Kotlin/kotlinx.serialization/issues/1004). It is possible, that both JVM
@ -16,13 +16,13 @@ and JS version may work improperly in some cases with `kotlinx.serialization` ve
It is a complex of libraries for working with `TelegramBotAPI` in type-safe and strict way as much as it possible. In
the list of this complex currently next projects:
* [TelegramBotAPI-core](TelegramBotAPI-core/README.md) - core of library. In fact it is independent library and can be used alone
* [TelegramBotAPI Core](tgbotapi.core/README.md) - core of library. In fact it is independent library and can be used alone
without any additional library
* [TelegramBotAPI Extensions](TelegramBotAPI-extensions-api/README.md) - contains extensions (mostly for
* [TelegramBotAPI API Extensions](tgbotapi.extensions.api/README.md) - contains extensions (mostly for
`RequestsExecutor`), which allows to use the core library in more pleasant way
* [TelegramBotAPI Util Extensions](TelegramBotAPI-extensions-utils/README.md) - contains extensions for more comfortable
* [TelegramBotAPI Util Extensions](tgbotapi.extensions.utils/README.md) - contains extensions for more comfortable
work with commands, updates and other different things
* [TelegramBotAPI](TelegramBotAPI/README.md) - concentration of all previously mentioned libraries
* [TelegramBotAPI](tgbotapi/README.md) - concentration of all previously mentioned libraries
Most part of some specific solves or unuseful
moments are describing by official [Telegram Bot API](https://core.telegram.org/bots/api).
@ -76,19 +76,19 @@ kotlin {
In most cases, the most simple way will be to implement [TelegramBotAPI](TelegramBotAPI/README.md) - it contains
all necessary tools for comfort usage of this library. If you want to exclude some libraries, you can implement just
[TelegramBotAPI API Extensions](TelegramBotAPI-extensions-api/README.md),
[TelegramBotAPI Util Extensions](TelegramBotAPI-extensions-utils/README.md) or even
[TelegramBotAPI-core](TelegramBotAPI-core/README.md).
[TelegramBotAPI API Extensions](tgbotapi.extensions.api/README.md),
[TelegramBotAPI Util Extensions](tgbotapi.extensions.utils/README.md) or even
[TelegramBotAPI Core](tgbotapi.core/README.md).
If you want to dive deeper in the core of library or develop something for it - welcome to learn more from
[TelegramBotAPI-core](TelegramBotAPI-core/README.md) and our [Telegram Chat](https://teleg.one/InMoTelegramBotAPIChat).
[TelegramBotAPI Core](tgbotapi.core/README.md) and our [Telegram Chat](https://teleg.one/InMoTelegramBotAPIChat).
Anyway, all libraries are very typical inside of them. Examples:
* In `TelegramBotAPI` common request look like `requestsExecutor.execute(SomeRequest())`
* `TelegramBotAPI-extensions-api` typical syntax look like `requestsExecutor.someRequest()` (in most cases it would be
* `tgbotapi.extensions.api` typical syntax look like `requestsExecutor.someRequest()` (in most cases it would be
better to use `bot` name instead of `requestsExecutor`)
* `TelegramBotAPI-extensions-utils` will look like `filter.filterBaseMessageUpdates(chatId).filterExactCommands(Regex("^.*$"))...`
* `tgbotapi.extensions.utils` will look like `filter.filterBaseMessageUpdates(chatId).filterExactCommands(Regex("^.*$"))...`
## Build instruction

View File

@ -1 +0,0 @@
{"bintrayConfig":{"repo":"StandardRepository","packageName":"${project.name}","packageVcs":"https://github.com/InsanusMokrassar/TelegramBotAPI","autoPublish":true},"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 Core","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"}]},"type":"Multiplatform"}

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>

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