Add Bot API 10.2 Communities support example

New CommunitiesBot demonstrating the 36.0.0 communities API:
- onCommunityChatAdded / onCommunityChatRemoved triggers for the
  community_chat_added / community_chat_removed service events
- reading the Community (id/name) from CommunityChatAdded
- ExtendedChat.community (ChatFullInfo.community) via getChat
- waitCommunityChatAdded expectation

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-19 17:22:18 +06:00
parent 868cf646bd
commit 56cc2e70c1
4 changed files with 133 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
apply plugin: 'kotlin'
apply plugin: 'application'
mainClassName="CommunitiesBotKt"
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation "dev.inmo:tgbotapi:$telegram_bot_api_version"
}