leaveChat

suspend fun TelegramBotApiClient.leaveChat(requestBody: LeaveChatRequest): TelegramResponse<Boolean>

Use this method for your bot to leave a group, supergroup or channel. Returns True on success.

suspend fun TelegramBotApiClient.leaveChat(chatId: Int): TelegramResponse<Boolean>

Use this method for your bot to leave a group, supergroup or channel. Returns True on success.

Parameters

chatId

Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)