1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-22 16:23:48 +00:00

remove unnecessary FromUser usages

This commit is contained in:
vasya 2021-06-29 03:34:27 +03:00
parent 022e6f623a
commit 12a35da4b6
3 changed files with 7 additions and 9 deletions

View File

@ -1,6 +1,5 @@
package dev.inmo.tgbotapi.types
import dev.inmo.tgbotapi.CommonAbstracts.FromUser
import dev.inmo.tgbotapi.types.ChatMember.abstracts.ChatMember
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
import kotlinx.serialization.SerialName
@ -11,7 +10,7 @@ data class ChatMemberUpdated(
@SerialName(chatField)
val chat: Chat,
@SerialName(fromField)
override val user: User,
val user: User,
@SerialName(dateField)
val date: TelegramDate,
@SerialName(oldChatMemberField)
@ -20,4 +19,4 @@ data class ChatMemberUpdated(
val newChatMemberState: ChatMember,
@SerialName(inviteLinkField)
val inviteLink: ChatInviteLink? = null
) : FromUser
)

View File

@ -1,16 +1,15 @@
package dev.inmo.tgbotapi.types.games
import dev.inmo.tgbotapi.CommonAbstracts.FromUser
import dev.inmo.tgbotapi.types.*
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
@Serializable
data class GameHighScore (
data class GameHighScore(
@SerialName(positionField)
val position: Long,
@SerialName(userField)
override val user: User,
val user: User,
@SerialName(scoreField)
val score: Long
) : FromUser
)

View File

@ -5,5 +5,5 @@ import dev.inmo.tgbotapi.types.User
import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.CommonEvent
data class LeftChatMember(
override val user: User
): CommonEvent, FromUser
val user: User
) : CommonEvent