mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-12-23 00:57:13 +00:00
add BotCommandScope helper extensions
This commit is contained in:
parent
92b4ba2ff0
commit
87fff2e5d0
@ -51,6 +51,16 @@ private class SurrogateBotCommandScope(
|
||||
@Serializable(BotCommandScopeSerializer::class)
|
||||
sealed interface BotCommandScope {
|
||||
val type: String
|
||||
|
||||
companion object {
|
||||
val Default = BotCommandScopeDefault
|
||||
val AllPrivateChats = BotCommandScopeAllPrivateChats
|
||||
val AllGroupChats = BotCommandScopeAllGroupChats
|
||||
val AllChatAdministrators = BotCommandScopeAllChatAdministrators
|
||||
fun ChatAdministrators(chatId: ChatIdentifier) = BotCommandScopeChatAdministrators(chatId)
|
||||
fun Chat(chatId: ChatIdentifier) = BotCommandScopeChat(chatId)
|
||||
fun ChatMember(chatId: ChatIdentifier, userId: UserId) = BotCommandScopeChatMember(chatId, userId)
|
||||
}
|
||||
}
|
||||
|
||||
@Serializable
|
||||
|
Loading…
Reference in New Issue
Block a user