libtd-ktx / kotlinx.telegram.extensions / CommonKtx
CommonKtx
interface CommonKtx :
BaseKtx
Interface for access common
Properties
api | Instance of the TelegramFlow connecting extensions to the Telegram Clientabstract val api: TelegramFlow |
Functions
delete | Suspend function, which deletes a profile photo. If something changes, updateUser will be sent.open suspend fun ProfilePhoto .delete(): Unit |
get | Suspend function, which returns information about a file by its remote ID; this is an offline request. Can be used to register a URL as a file for further uploading, or sending as a message. Even the request succeeds, the file can be used only if it is still accessible to the user. For example, if the file is from a message, then the message must be not deleted and accessible to the user. If the file database is disabled, then the corresponding object with the file must be preloaded by the client.open suspend fun RemoteFile .get(fileType: FileType ?): File |
remove | Suspend function, which removes background from the list of installed backgrounds.open suspend fun Background .remove(): Unit Suspend function, which removes an active notification from notification list. Needs to be called only if the notification is removed by the current user. open suspend fun Notification .remove(notificationGroupId: Int ): Unit |
sendPaymentForm | Suspend function, which sends a filled-out payment form to the bot for final verification.open suspend fun ShippingOption .sendPaymentForm(chatId: Long , messageId: Long , orderInfoId: String ?, credentials: InputCredentials ?): PaymentResult |
setSupergroup | Suspend function, which changes the sticker set of a supergroup; requires canChangeInfo rights.open suspend fun StickerSet .setSupergroup(supergroupId: Int ): Unit |
terminate | Suspend function, which terminates a session of the current user.open suspend fun Session .terminate(): Unit |
Inheritors
TelegramKtx | Interface for access all Telegram objects extension functions. Contains 182 extensionsinterface TelegramKtx : BasicGroupKtx , CallKtx , ChatKtx , FileKtx , MessageKtx , NotificationGroupKtx , ProxyKtx , SecretChatKtx , SupergroupKtx , UserKtx , CommonKtx |