1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-22 16:23:48 +00:00

rename RequestsExecutor#setChatPermissions -> RequestsExecutor#setDefaultChatMembersPermissions

This commit is contained in:
InsanusMokrassar 2020-02-06 23:15:13 +06:00
parent 86f1e3ea36
commit 69f81785bf

View File

@ -5,7 +5,6 @@ import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest
import com.github.insanusmokrassar.TelegramBotAPI.types.*
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.ChatPermissions
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PublicChat
import kotlinx.serialization.*
import kotlinx.serialization.internal.BooleanSerializer
@ -24,12 +23,12 @@ data class SetChatPermissions (
get() = serializer()
}
suspend fun RequestsExecutor.setChatPermissions(
suspend fun RequestsExecutor.setDefaultChatMembersPermissions(
chatId: ChatIdentifier,
permissions: ChatPermissions
) = execute(SetChatPermissions(chatId, permissions))
suspend fun RequestsExecutor.setChatPermissions(
suspend fun RequestsExecutor.setDefaultChatMembersPermissions(
chat: PublicChat,
permissions: ChatPermissions
) = setChatPermissions(chat.id, permissions)
) = setDefaultChatMembersPermissions(chat.id, permissions)