mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 16:23:48 +00:00
commit
6532bf255b
10
CHANGELOG.md
10
CHANGELOG.md
@ -1,5 +1,15 @@
|
|||||||
# TelegramBotAPI changelog
|
# TelegramBotAPI changelog
|
||||||
|
|
||||||
|
## 6.0.3
|
||||||
|
|
||||||
|
* `Versions`:
|
||||||
|
* `MicroUtils`: `0.17.1` -> `0.17.2`
|
||||||
|
* `Core`:
|
||||||
|
* `User` in `CallbackQuery` now is `CommonUser` as well as in `from`
|
||||||
|
* `User` in `InlineQuery` now is `CommonUser` as well as in `from`
|
||||||
|
* `BehaviourBuilder`:
|
||||||
|
* Fixes in `DeepLink` triggers and waiters
|
||||||
|
|
||||||
## 6.0.2
|
## 6.0.2
|
||||||
|
|
||||||
* `Core`:
|
* `Core`:
|
||||||
|
@ -6,4 +6,4 @@ kotlin.incremental=true
|
|||||||
kotlin.incremental.js=true
|
kotlin.incremental.js=true
|
||||||
|
|
||||||
library_group=dev.inmo
|
library_group=dev.inmo
|
||||||
library_version=6.0.2
|
library_version=6.0.3
|
||||||
|
@ -13,7 +13,7 @@ ktor = "2.2.4"
|
|||||||
ksp = "1.8.10-1.0.9"
|
ksp = "1.8.10-1.0.9"
|
||||||
kotlin-poet = "1.12.0"
|
kotlin-poet = "1.12.0"
|
||||||
|
|
||||||
microutils = "0.17.1"
|
microutils = "0.17.2"
|
||||||
|
|
||||||
github-release-plugin = "2.4.1"
|
github-release-plugin = "2.4.1"
|
||||||
dokka = "1.7.20"
|
dokka = "1.7.20"
|
||||||
|
@ -38,7 +38,7 @@ suspend fun <BC : BehaviourContext> BC.onDeepLink(
|
|||||||
scenarioReceiver,
|
scenarioReceiver,
|
||||||
) {
|
) {
|
||||||
(it.messageUpdateOrNull()) ?.data ?.commonMessageOrNull() ?.withContentOrNull<TextContent>() ?.let { message ->
|
(it.messageUpdateOrNull()) ?.data ?.commonMessageOrNull() ?.withContentOrNull<TextContent>() ?.let { message ->
|
||||||
message to message.content.textSources[1].source.removePrefix(" ").decodeURLQueryComponent()
|
message to (message.content.textSources.getOrNull(1) ?.source ?.removePrefix(" ") ?.decodeURLQueryComponent() ?: return@let null)
|
||||||
} ?.let(::listOfNotNull)
|
} ?.let(::listOfNotNull)
|
||||||
}.also {
|
}.also {
|
||||||
triggersHolder.handleableCommandsHolder.registerHandleable(startRegex)
|
triggersHolder.handleableCommandsHolder.registerHandleable(startRegex)
|
||||||
|
@ -3,10 +3,11 @@ package dev.inmo.tgbotapi.types.InlineQueries.query
|
|||||||
import dev.inmo.tgbotapi.types.InlineQueryIdentifier
|
import dev.inmo.tgbotapi.types.InlineQueryIdentifier
|
||||||
import dev.inmo.tgbotapi.types.chat.User
|
import dev.inmo.tgbotapi.types.chat.User
|
||||||
import dev.inmo.tgbotapi.types.chat.ChatType
|
import dev.inmo.tgbotapi.types.chat.ChatType
|
||||||
|
import dev.inmo.tgbotapi.types.chat.CommonUser
|
||||||
|
|
||||||
data class BaseInlineQuery(
|
data class BaseInlineQuery(
|
||||||
override val id: InlineQueryIdentifier,
|
override val id: InlineQueryIdentifier,
|
||||||
override val from: User,
|
override val from: CommonUser,
|
||||||
override val query: String,
|
override val query: String,
|
||||||
override val offset: String,
|
override val offset: String,
|
||||||
override val chatType: ChatType?
|
override val chatType: ChatType?
|
||||||
|
@ -3,10 +3,16 @@ package dev.inmo.tgbotapi.types.InlineQueries.query
|
|||||||
import dev.inmo.tgbotapi.abstracts.FromUser
|
import dev.inmo.tgbotapi.abstracts.FromUser
|
||||||
import dev.inmo.tgbotapi.types.InlineQueryIdentifier
|
import dev.inmo.tgbotapi.types.InlineQueryIdentifier
|
||||||
import dev.inmo.tgbotapi.types.chat.ChatType
|
import dev.inmo.tgbotapi.types.chat.ChatType
|
||||||
|
import dev.inmo.tgbotapi.types.chat.CommonUser
|
||||||
|
import dev.inmo.tgbotapi.types.chat.User
|
||||||
|
|
||||||
sealed interface InlineQuery : FromUser {
|
sealed interface InlineQuery : FromUser {
|
||||||
val id: InlineQueryIdentifier
|
val id: InlineQueryIdentifier
|
||||||
val query: String
|
val query: String
|
||||||
val offset: String
|
val offset: String
|
||||||
val chatType: ChatType?
|
val chatType: ChatType?
|
||||||
|
|
||||||
|
override val from: CommonUser
|
||||||
|
override val user: CommonUser
|
||||||
|
get() = from
|
||||||
}
|
}
|
||||||
|
@ -3,11 +3,12 @@ package dev.inmo.tgbotapi.types.InlineQueries.query
|
|||||||
import dev.inmo.tgbotapi.types.InlineQueryIdentifier
|
import dev.inmo.tgbotapi.types.InlineQueryIdentifier
|
||||||
import dev.inmo.tgbotapi.types.chat.User
|
import dev.inmo.tgbotapi.types.chat.User
|
||||||
import dev.inmo.tgbotapi.types.chat.ChatType
|
import dev.inmo.tgbotapi.types.chat.ChatType
|
||||||
|
import dev.inmo.tgbotapi.types.chat.CommonUser
|
||||||
import dev.inmo.tgbotapi.types.location.Location
|
import dev.inmo.tgbotapi.types.location.Location
|
||||||
|
|
||||||
data class LocationInlineQuery(
|
data class LocationInlineQuery(
|
||||||
override val id: InlineQueryIdentifier,
|
override val id: InlineQueryIdentifier,
|
||||||
override val from: User,
|
override val from: CommonUser,
|
||||||
override val query: String,
|
override val query: String,
|
||||||
override val offset: String,
|
override val offset: String,
|
||||||
override val chatType: ChatType?,
|
override val chatType: ChatType?,
|
||||||
|
@ -12,7 +12,7 @@ internal data class RawInlineQuery(
|
|||||||
@SerialName(idField)
|
@SerialName(idField)
|
||||||
val id: InlineQueryIdentifier,
|
val id: InlineQueryIdentifier,
|
||||||
@SerialName(fromField)
|
@SerialName(fromField)
|
||||||
val from: User,
|
val from: CommonUser,
|
||||||
@SerialName(queryField)
|
@SerialName(queryField)
|
||||||
val query: String,
|
val query: String,
|
||||||
@SerialName(offsetField)
|
@SerialName(offsetField)
|
||||||
|
@ -9,6 +9,8 @@ sealed interface CallbackQuery : FromUser {
|
|||||||
val id: CallbackQueryIdentifier
|
val id: CallbackQueryIdentifier
|
||||||
val chatInstance: String
|
val chatInstance: String
|
||||||
override val from: CommonUser
|
override val from: CommonUser
|
||||||
|
override val user: CommonUser
|
||||||
|
get() = from
|
||||||
}
|
}
|
||||||
|
|
||||||
data class UnknownCallbackQueryType(
|
data class UnknownCallbackQueryType(
|
||||||
|
Loading…
Reference in New Issue
Block a user