update ktgbotapi version 9.2.2

This commit is contained in:
2023-10-11 15:21:44 +06:00
parent a81cfaaba9
commit 9773a74890
3 changed files with 6 additions and 8 deletions

View File

@@ -32,16 +32,16 @@ suspend fun main(vararg args: String) {
val chat = message.chat
val answerText = when (val chat = message.chat) {
is ChannelChat -> {
is PreviewChannelChat -> {
val answer = "Hi everybody in this channel \"${chat.title}\""
reply(message, answer, MarkdownV2)
return@onMentionWithAnyContent
}
is PrivateChat -> {
is PreviewPrivateChat -> {
reply(message, "Hi, " + "${chat.firstName} ${chat.lastName}".textMentionMarkdownV2(chat.id), MarkdownV2)
return@onMentionWithAnyContent
}
is GroupChat -> {
is PreviewGroupChat -> {
message.ifFromChannelGroupContentMessage {
val answer = "Hi, ${it.senderChat.title}"
reply(message, answer, MarkdownV2)
@@ -56,9 +56,7 @@ suspend fun main(vararg args: String) {
} ?: chat.title
}
}
is UnknownExtendedChat,
is UnknownChatType -> "Unknown :(".escapeMarkdownV2Common()
else -> error("Something went wrong: unknown type of chat $chat")
}
reply(
message,