searchPublicChat - libtd-ktx

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


libtd-ktx / kotlinx.telegram.coroutines / searchPublicChat

searchPublicChat

suspend fun TelegramFlow.searchPublicChat(username: String?): Chat

Suspend function, which searches a public chat by its username. Currently only private chats, supergroups and channels can be public. Returns the chat if found; otherwise an error is returned.

Parameters

username - Username to be resolved.

Return Chat A chat. (Can be a private chat, basic group, supergroup, or secret chat.)