setChatPhoto - libtd-ktx

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


libtd-ktx / kotlinx.telegram.coroutines / setChatPhoto

setChatPhoto

suspend fun TelegramFlow.setChatPhoto(chatId: Long, 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

chatId - Chat identifier.

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.