SupergroupKtx - libtd-ktx

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


libtd-ktx / kotlinx.telegram.extensions / SupergroupKtx

SupergroupKtx

interface SupergroupKtx : BaseKtx

Interface for access TdApi.Supergroup extension functions. Can be used alongside with other extension interfaces of the package. Must contain TelegramFlow instance field to access its functionality

Properties

api Instance of the TelegramFlow connecting extensions to the Telegram Clientabstract val api: TelegramFlow

Functions

createChat Suspend function, which returns an existing chat corresponding to a known supergroup or channel.open suspend fun Supergroup.createChat(force: Boolean): Chat
delete Suspend function, which deletes a supergroup or channel along with all messages in the corresponding chat. This will release the supergroup or channel username and remove all members; requires owner privileges in the supergroup or channel. Chats with more than 1000 members can’t be deleted using this method.open suspend fun Supergroup.delete(): Unit
get Suspend function, which returns information about a supergroup or a channel by its identifier. This is an offline request if the current user is not a bot.open suspend fun Supergroup.get(): Supergroup
getFullInfo Suspend function, which returns full information about a supergroup or a channel by its identifier, cached for up to 1 minute.open suspend fun Supergroup.getFullInfo(): SupergroupFullInfo
getMembers Suspend function, which returns information about members or banned users in a supergroup or channel. Can be used only if SupergroupFullInfo.canGetMembers == true; additionally, administrator privileges may be required for some filters.open suspend fun Supergroup.getMembers(filter: SupergroupMembersFilter?, offset: Int, limit: Int): ChatMembers
reportSpam Suspend function, which reports some messages from a user in a supergroup as spam; requires administrator rights in the supergroup.open suspend fun Supergroup.reportSpam(userId: Int, messageIds: LongArray?): Unit
setStickerSet Suspend function, which changes the sticker set of a supergroup; requires canChangeInfo rights.open suspend fun Supergroup.setStickerSet(stickerSetId: Long): Unit
setUsername Suspend function, which changes the username of a supergroup or channel, requires owner privileges in the supergroup or channel.open suspend fun Supergroup.setUsername(username: String?): Unit
toggleIsAllHistoryAvailable Suspend function, which toggles whether the message history of a supergroup is available to new members; requires canChangeInfo rights.open suspend fun Supergroup.toggleIsAllHistoryAvailable(isAllHistoryAvailable: Boolean): Unit
toggleSignMessages Suspend function, which toggles sender signatures messages sent in a channel; requires canChangeInfo rights.open suspend fun Supergroup.toggleSignMessages(signMessages: Boolean): 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