
commonMain.dev.inmo.tgbotapi.abstracts.FromUser.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tgbotapi.core-jvm Show documentation
Show all versions of tgbotapi.core-jvm Show documentation
Core part of tgbotapi with all (and only) required functionality for working with Telegram Bot API
package dev.inmo.tgbotapi.abstracts
import dev.inmo.tgbotapi.types.chat.User
/**
* Inheritors of this interface **may** have some [User] as a source of data. For example, any [dev.inmo.tgbotapi.types.queries.callback.CallbackQuery]
* have [User] as the source of that query
*/
interface OptionallyFromUser : OptionallyWithUser {
/**
* The source [User] of this type
*/
val from: User?
override val user: User?
get() = from
}
/**
* Inheritors of this interface **must** have some [User] as a source of data. For example, any [dev.inmo.tgbotapi.types.queries.callback.CallbackQuery]
* have [User] as the source of that query
*/
interface FromUser : OptionallyFromUser, WithUser {
/**
* The source [User] of this type
*/
override val from: User
override val user: User
get() = from
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy