mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2025-02-16 19:52:01 +00:00
rename RequestsExecutor#setChatPermissions -> RequestsExecutor#setDefaultChatMembersPermissions
This commit is contained in:
parent
86f1e3ea36
commit
69f81785bf
@ -5,7 +5,6 @@ import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
|||||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest
|
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.ChatPermissions
|
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 com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PublicChat
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.*
|
||||||
import kotlinx.serialization.internal.BooleanSerializer
|
import kotlinx.serialization.internal.BooleanSerializer
|
||||||
@ -24,12 +23,12 @@ data class SetChatPermissions (
|
|||||||
get() = serializer()
|
get() = serializer()
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun RequestsExecutor.setChatPermissions(
|
suspend fun RequestsExecutor.setDefaultChatMembersPermissions(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
permissions: ChatPermissions
|
permissions: ChatPermissions
|
||||||
) = execute(SetChatPermissions(chatId, permissions))
|
) = execute(SetChatPermissions(chatId, permissions))
|
||||||
|
|
||||||
suspend fun RequestsExecutor.setChatPermissions(
|
suspend fun RequestsExecutor.setDefaultChatMembersPermissions(
|
||||||
chat: PublicChat,
|
chat: PublicChat,
|
||||||
permissions: ChatPermissions
|
permissions: ChatPermissions
|
||||||
) = setChatPermissions(chat.id, permissions)
|
) = setDefaultChatMembersPermissions(chat.id, permissions)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user