mirror of
				https://github.com/InsanusMokrassar/TelegramBotAPI.git
				synced 2025-10-25 09:10:07 +00:00 
			
		
		
		
	add BotCommandScope helper extensions
This commit is contained in:
		| @@ -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 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user