mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2025-09-16 13:49:26 +00:00
improvements in same-notations
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
package dev.inmo.tgbotapi.abstracts
|
||||
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
|
||||
/**
|
||||
* All inheritors of this interface have [chat] field and related to this [chat]
|
||||
*/
|
||||
interface WithChat {
|
||||
val chat: Chat
|
||||
}
|
@@ -1,6 +1,7 @@
|
||||
package dev.inmo.tgbotapi.types.message.abstracts
|
||||
|
||||
import com.soywiz.klock.DateTime
|
||||
import dev.inmo.tgbotapi.abstracts.WithChat
|
||||
import dev.inmo.tgbotapi.utils.internal.ClassCastsIncluded
|
||||
import dev.inmo.tgbotapi.types.MessageId
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
@@ -11,9 +12,8 @@ import kotlinx.serialization.encoding.Decoder
|
||||
import kotlinx.serialization.encoding.Encoder
|
||||
|
||||
@ClassCastsIncluded
|
||||
interface Message {
|
||||
interface Message : WithChat {
|
||||
val messageId: MessageId
|
||||
val chat: Chat
|
||||
val date: DateTime
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user