ChatKtx.setPhoto - libtd-ktx

Kotlin Coroutines extensions for Telegram API TDLib (Telegram Database library)


libtd-ktx / kotlinx.telegram.extensions / ChatKtx / setPhoto

setPhoto

open suspend fun Chat.setPhoto(photo: InputFile?): Unit

Suspend function, which changes the photo of a chat. Supported only for basic groups, supergroups and channels. Requires canChangeInfo rights. The photo will not be changed before request to the server has been completed.

Parameters

photo - New chat photo. You can use a zero InputFileId to delete the chat photo. Files that are accessible only by HTTP URL are not acceptable.