mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2026-10-25 14:07:28 +00:00
Add Bot API 10.2 Communities support
New communities domain: Community + CommunityId, CommunityChatAdded and CommunityChatRemoved service messages (CommonEvent) wired through RawMessage, ChatFullInfo/ExtendedChat.community (including ExtendedBot), plus onCommunityChatAdded/onCommunityChatRemoved triggers and wait expectations. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
838caae7f5
commit
0c329326f7
16 files changed
+344
-29
No files matched your search
+14
@@ -201,6 +201,8 @@ import dev.inmo.tgbotapi.types.chat.member.SpecialRightsChatMember
|
||||
import dev.inmo.tgbotapi.types.chat.member.SubscriptionMemberChatMember
|
||||
import dev.inmo.tgbotapi.types.checklists.ChecklistTasksAdded
|
||||
import dev.inmo.tgbotapi.types.checklists.ChecklistTasksDone
|
||||
import dev.inmo.tgbotapi.types.communities.CommunityChatAdded
|
||||
import dev.inmo.tgbotapi.types.communities.CommunityChatRemoved
|
||||
import dev.inmo.tgbotapi.types.dice.BasketballDiceAnimationType
|
||||
import dev.inmo.tgbotapi.types.dice.BowlingDiceAnimationType
|
||||
import dev.inmo.tgbotapi.types.dice.CubeDiceAnimationType
|
||||
@@ -2114,6 +2116,18 @@ public inline fun ChatEvent.managedBotCreatedOrThrow(): ManagedBotCreated = this
|
||||
|
||||
public inline fun <T> ChatEvent.ifManagedBotCreated(block: (ManagedBotCreated) -> T): T? = managedBotCreatedOrNull() ?.let(block)
|
||||
|
||||
public inline fun ChatEvent.communityChatAddedOrNull(): CommunityChatAdded? = this as? dev.inmo.tgbotapi.types.communities.CommunityChatAdded
|
||||
|
||||
public inline fun ChatEvent.communityChatAddedOrThrow(): CommunityChatAdded = this as dev.inmo.tgbotapi.types.communities.CommunityChatAdded
|
||||
|
||||
public inline fun <T> ChatEvent.ifCommunityChatAdded(block: (CommunityChatAdded) -> T): T? = communityChatAddedOrNull() ?.let(block)
|
||||
|
||||
public inline fun ChatEvent.communityChatRemovedOrNull(): CommunityChatRemoved? = this as? dev.inmo.tgbotapi.types.communities.CommunityChatRemoved
|
||||
|
||||
public inline fun ChatEvent.communityChatRemovedOrThrow(): CommunityChatRemoved = this as dev.inmo.tgbotapi.types.communities.CommunityChatRemoved
|
||||
|
||||
public inline fun <T> ChatEvent.ifCommunityChatRemoved(block: (CommunityChatRemoved) -> T): T? = communityChatRemovedOrNull() ?.let(block)
|
||||
|
||||
public inline fun ChatEvent.chatBackgroundOrNull(): ChatBackground? = this as? dev.inmo.tgbotapi.types.chat.ChatBackground
|
||||
|
||||
public inline fun ChatEvent.chatBackgroundOrThrow(): ChatBackground = this as dev.inmo.tgbotapi.types.chat.ChatBackground
|
||||
|
||||
Reference in new issue
Block a user