1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-06-02 07:55:25 +00:00
tgbotapi/TelegramBotAPI-extensions-api/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/extensions/api/chat/LeaveChat.kt

15 lines
554 B
Kotlin
Raw Normal View History

2020-02-15 09:33:04 +00:00
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.chat
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.chat.LeaveChat
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PublicChat
suspend fun RequestsExecutor.leaveChat(
chatId: ChatIdentifier
) = execute(LeaveChat(chatId))
suspend fun RequestsExecutor.leaveChat(
chat: PublicChat
) = leaveChat(chat.id)