mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 16:23:48 +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)
|
@Serializable(BotCommandScopeSerializer::class)
|
||||||
sealed interface BotCommandScope {
|
sealed interface BotCommandScope {
|
||||||
val type: String
|
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
|
@Serializable
|
||||||
|
Loading…
Reference in New Issue
Block a user