mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 08:13:47 +00:00
reply_markup in messages
This commit is contained in:
parent
5bc3169578
commit
4570df330b
@ -3,6 +3,7 @@
|
||||
## 0.16.0 Bot API 4.3
|
||||
|
||||
* `LoginURL` and `LoginURLInlineKeyboardButton` has been added
|
||||
* `replyMarkup` field was added to the `CommonMessage` objects via `AbleToBeMarkedUp` interface
|
||||
|
||||
## 0.15.0
|
||||
|
||||
|
@ -2,6 +2,7 @@ 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
|
||||
@ -16,5 +17,6 @@ data class ChannelMediaGroupMessage(
|
||||
override val content: MediaGroupContent,
|
||||
override val editDate: DateTime?,
|
||||
override val forwarded: ForwardedMessage?,
|
||||
override val replyTo: Message?
|
||||
override val replyTo: Message?,
|
||||
override val replyMarkup: InlineKeyboardMarkup?
|
||||
) : MediaGroupMessage
|
||||
|
@ -2,6 +2,7 @@ package com.github.insanusmokrassar.TelegramBotAPI.types.message
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.AuthorSignature
|
||||
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.CommonMessage
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.Message
|
||||
@ -16,5 +17,6 @@ data class ChannelMessage<T: MessageContent>(
|
||||
override val editDate: DateTime?,
|
||||
override val forwarded: ForwardedMessage?,
|
||||
override val replyTo: Message?,
|
||||
override val replyMarkup: InlineKeyboardMarkup?,
|
||||
val authorSignature: AuthorSignature?
|
||||
) : CommonMessage<T>
|
||||
|
@ -1,6 +1,7 @@
|
||||
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.*
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.message.content.abstracts.MediaGroupContent
|
||||
@ -15,5 +16,6 @@ data class CommonMediaGroupMessage(
|
||||
override val content: MediaGroupContent,
|
||||
override val editDate: DateTime?,
|
||||
override val forwarded: ForwardedMessage?,
|
||||
override val replyTo: Message?
|
||||
override val replyTo: Message?,
|
||||
override val replyMarkup: InlineKeyboardMarkup?
|
||||
) : MediaGroupMessage, FromUserMessage
|
||||
|
@ -2,6 +2,7 @@ package com.github.insanusmokrassar.TelegramBotAPI.types.message
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.MessageIdentifier
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.User
|
||||
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.*
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.message.content.abstracts.MessageContent
|
||||
@ -17,5 +18,6 @@ data class CommonMessageImpl<T: MessageContent>(
|
||||
override val editDate: DateTime?,
|
||||
override val forwarded: ForwardedMessage?,
|
||||
override val replyTo: Message?,
|
||||
override val replyMarkup: InlineKeyboardMarkup?,
|
||||
val paymentInfo: PaymentInfo?
|
||||
) : Message, CommonMessage<T>, FromUserMessage
|
@ -3,6 +3,7 @@ package com.github.insanusmokrassar.TelegramBotAPI.types.message
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.MessageEntity.RawMessageEntities
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.MessageEntity.RawMessageEntitiesSerializer
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.*
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.GroupChat
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.files.*
|
||||
@ -82,7 +83,9 @@ data class RawMessage(
|
||||
private val connected_website: String? = null,
|
||||
|
||||
// passport property
|
||||
private val passport_data: Unit? = null
|
||||
private val passport_data: Unit? = null,
|
||||
|
||||
private val reply_markup: InlineKeyboardMarkup? = null
|
||||
) {
|
||||
@Transient
|
||||
private val content: MessageContent? by lazy {
|
||||
@ -227,7 +230,8 @@ data class RawMessage(
|
||||
},
|
||||
edit_date ?.asDate,
|
||||
forwarded,
|
||||
reply_to_message ?.asMessage
|
||||
reply_to_message ?.asMessage,
|
||||
reply_markup
|
||||
)
|
||||
else -> CommonMediaGroupMessage(
|
||||
messageId,
|
||||
@ -242,7 +246,8 @@ data class RawMessage(
|
||||
},
|
||||
edit_date ?.asDate,
|
||||
forwarded,
|
||||
reply_to_message ?.asMessage
|
||||
reply_to_message ?.asMessage,
|
||||
reply_markup
|
||||
)
|
||||
}
|
||||
} ?: when (chat) {
|
||||
@ -254,6 +259,7 @@ data class RawMessage(
|
||||
edit_date ?.asDate,
|
||||
forwarded,
|
||||
reply_to_message ?.asMessage,
|
||||
reply_markup,
|
||||
author_signature
|
||||
)
|
||||
else -> CommonMessageImpl(
|
||||
@ -265,6 +271,7 @@ data class RawMessage(
|
||||
edit_date ?.asDate,
|
||||
forwarded,
|
||||
reply_to_message ?.asMessage,
|
||||
reply_markup,
|
||||
paymentInfo
|
||||
)
|
||||
}
|
||||
|
@ -0,0 +1,7 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
||||
|
||||
interface AbleToBeMarkedUp {
|
||||
val replyMarkup: InlineKeyboardMarkup?
|
||||
}
|
@ -6,4 +6,5 @@ interface CommonMessage<T: MessageContent> : Message,
|
||||
AbleToBeForwardedMessage,
|
||||
AbleToBeEditedMessage,
|
||||
AbleToReplyMessage,
|
||||
AbleToBeMarkedUp,
|
||||
ContentMessage<T>
|
||||
|
Loading…
Reference in New Issue
Block a user